#include "pop.h" #include "codes.h" #include #include #include using namespace std::string_literals; Op_pop::Op_pop(const Asm::Args& args) { if (args[0].type() == typeid(Asm::Args::Register64)) { // pop reg64 machine_code = std::vector{ 0x58 } + RegNo(std::any_cast(args[0]).name()); } else { throw std::runtime_error("Unimplemented: pop "s + args[0].type().name()); } } namespace { bool registered { registerOp(mangleName("pop"), [](const Asm::Args& args) -> std::shared_ptr{ return std::make_shared(args); }) }; }