diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-10-18 16:59:54 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-10-18 16:59:54 +0200 |
commit | 8a2d1dc5c8b6639985d26d1c915048d87d52426b (patch) | |
tree | 2f3957a1c24ef35b4ec9259a6a0d97393b248a57 /asm/chunk.h | |
parent | 8f28495ab9a8ebf53868405541e907394895e51f (diff) |
Added xor, mov, jmp
Diffstat (limited to 'asm/chunk.h')
-rw-r--r-- | asm/chunk.h | 17 |
1 files changed, 17 insertions, 0 deletions
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 <string> #include <vector> +// TODO: use it everywhere! +using OP_T = std::vector<uint8_t>; + 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<uint8_t> machine_code; + size_t addr_size; + size_t addr_offs; ///< offset inside code + + std::vector<uint8_t> alternative_code; + size_t alternative_size; + size_t alternative_offs; ///< offset inside code +}; + class Label: public Chunk { public: |