diff options
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: |