diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-09 10:35:00 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-09 10:35:00 +0100 |
commit | 6ab3715ee2622e293f7c4924511f31347b327e6e (patch) | |
tree | eca588d3d8c320cb25f209b76db91b95cd9f5614 /asm/assembler.h | |
parent | 1ac8ab06e9aad3b6d22685255459d71cb49e1f28 (diff) |
Implement inc instruction, support 64 bit regs
Diffstat (limited to 'asm/assembler.h')
-rw-r--r-- | asm/assembler.h | 15 |
1 files changed, 15 insertions, 0 deletions
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<uint8_t> getCode() { + std::vector<uint8_t> result(size_t(8)); + *(reinterpret_cast<uint64_t*>(result.data())) = boost::endian::native_to_little(m_value); + return result; + }; + + private: + uint64_t m_value; + }; + class Register8 { public: |