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/push.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'asm/intel64/push.cpp') diff --git a/asm/intel64/push.cpp b/asm/intel64/push.cpp index 37acec9..9fb5955 100644 --- a/asm/intel64/push.cpp +++ b/asm/intel64/push.cpp @@ -12,7 +12,7 @@ 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{ 0x50 } + RegNo(std::any_cast(args[0]).name()); + 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()); } -- cgit v1.2.3