summaryrefslogtreecommitdiffhomepage
path: root/asm/intel64/push.cpp
diff options
context:
space:
mode:
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());
}