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