From 739297d8895b08a9ecd8e81b01b7ba8e8dc4a8ae Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 21 Nov 2020 22:57:25 +0100 Subject: Bugfix push + pop --- asm/intel64/pop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'asm/intel64/pop.cpp') diff --git a/asm/intel64/pop.cpp b/asm/intel64/pop.cpp index 6d8b734..6b396a2 100644 --- a/asm/intel64/pop.cpp +++ b/asm/intel64/pop.cpp @@ -12,7 +12,7 @@ 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()); + machine_code = std::vector{ static_cast(0x58 + RegNo(std::any_cast(args[0]).name())) }; } else { throw std::runtime_error("Unimplemented: pop "s + args[0].type().name()); } -- cgit v1.2.3