summaryrefslogtreecommitdiffhomepage
path: root/asm/intel64/push.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-21 22:57:25 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-21 22:57:25 +0100
commit739297d8895b08a9ecd8e81b01b7ba8e8dc4a8ae (patch)
treede0c20a23a60c1ccca8585f5ddd71eeb6be25623 /asm/intel64/push.cpp
parent39bccce4fdd1d5ebe312321c963e0325e4d696c5 (diff)
Bugfix push + pop
Diffstat (limited to 'asm/intel64/push.cpp')
-rw-r--r--asm/intel64/push.cpp2
1 files changed, 1 insertions, 1 deletions
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<uint8_t>{ 0x50 } + RegNo(std::any_cast<Asm::Args::Register64>(args[0]).name());
+ machine_code = std::vector<uint8_t>{ static_cast<uint8_t>(0x50 + RegNo(std::any_cast<Asm::Args::Register64>(args[0]).name())) };
} else {
throw std::runtime_error("Unimplemented: push "s + args[0].type().name());
}