summaryrefslogtreecommitdiffhomepage
path: root/asm/assembler.h
diff options
context:
space:
mode:
Diffstat (limited to 'asm/assembler.h')
-rw-r--r--asm/assembler.h15
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: