diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-21 22:57:25 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-21 22:57:25 +0100 |
commit | 739297d8895b08a9ecd8e81b01b7ba8e8dc4a8ae (patch) | |
tree | de0c20a23a60c1ccca8585f5ddd71eeb6be25623 /asm/intel64/pop.cpp | |
parent | 39bccce4fdd1d5ebe312321c963e0325e4d696c5 (diff) |
Bugfix push + pop
Diffstat (limited to 'asm/intel64/pop.cpp')
-rw-r--r-- | asm/intel64/pop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<uint8_t>{ 0x58 } + RegNo(std::any_cast<Asm::Args::Register64>(args[0]).name()); + machine_code = std::vector<uint8_t>{ static_cast<uint8_t>(0x58 + RegNo(std::any_cast<Asm::Args::Register64>(args[0]).name())) }; } else { throw std::runtime_error("Unimplemented: pop "s + args[0].type().name()); } |