From 6ab3715ee2622e293f7c4924511f31347b327e6e Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 9 Nov 2020 10:35:00 +0100 Subject: Implement inc instruction, support 64 bit regs --- asm/assembler.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'asm/assembler.h') diff --git a/asm/assembler.h b/asm/assembler.h index 832a78e..b459b85 100644 --- a/asm/assembler.h +++ b/asm/assembler.h @@ -48,6 +48,21 @@ public: uint32_t m_value; }; + class Immediate64 + { + public: + Immediate64(uint64_t value): m_value(value) {} + uint64_t value() { return m_value; } + std::vector getCode() { + std::vector result(size_t(8)); + *(reinterpret_cast(result.data())) = boost::endian::native_to_little(m_value); + return result; + }; + + private: + uint64_t m_value; + }; + class Register8 { public: -- cgit v1.2.3