From 7250bbe5ae2d2ee6b0334bc462aab73f7d8dac0e Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 20 Nov 2020 10:59:18 +0100 Subject: Assembler bugfixes - tests run successfully now --- asm/assembler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'asm/assembler.cpp') diff --git a/asm/assembler.cpp b/asm/assembler.cpp index b555125..4eb37f0 100644 --- a/asm/assembler.cpp +++ b/asm/assembler.cpp @@ -2,6 +2,14 @@ using namespace std::string_literals; +Asm::Args::Immediate32::Immediate32(const Asm::Args::Immediate64& imm64) +{ + if (imm64.value() < 0x100000000) + m_value = static_cast(imm64.value()); + else + throw std::runtime_error("Immediate32: Constructed from too big Immediate64"); +} + namespace { std::unordered_map ops; -- cgit v1.2.3