From 8a2d1dc5c8b6639985d26d1c915048d87d52426b Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 18 Oct 2020 16:59:54 +0200 Subject: Added xor, mov, jmp --- asm/chunk.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'asm/chunk.h') diff --git a/asm/chunk.h b/asm/chunk.h index cc45ea9..cf6efaa 100644 --- a/asm/chunk.h +++ b/asm/chunk.h @@ -6,6 +6,9 @@ #include #include +// TODO: use it everywhere! +using OP_T = std::vector; + class Chunk { public: @@ -14,6 +17,20 @@ public: virtual size_t size() = 0; ///< returns size in bytes }; +// can be added via multiple inheritance to chunks with addresses +struct AddressFeature +{ + std::string label; + + std::vector machine_code; + size_t addr_size; + size_t addr_offs; ///< offset inside code + + std::vector alternative_code; + size_t alternative_size; + size_t alternative_offs; ///< offset inside code +}; + class Label: public Chunk { public: -- cgit v1.2.3