diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-16 12:48:44 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-16 12:48:44 +0100 |
commit | c9cb051fae190acfc36813e4a23759fb9b9c3df3 (patch) | |
tree | fcd8c93cd5dc2a3272eac253b0291611e16ea13f /asm/intel64/codes.h | |
parent | 300219dc8519720a36525c7b40c6a327580fe0bd (diff) |
Implement hierarchical evaluation (WIP)
Diffstat (limited to 'asm/intel64/codes.h')
-rw-r--r-- | asm/intel64/codes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/asm/intel64/codes.h b/asm/intel64/codes.h index 112eef4..ba378a6 100644 --- a/asm/intel64/codes.h +++ b/asm/intel64/codes.h @@ -9,7 +9,9 @@ std::vector<uint8_t> REX(const std::string& s); // Manual, page 530 // Reg + Reg/Memory -uint8_t ModRM(const std::string& reg, const std::string& rm); +// disp: optional, only necessary in some cases, e.g. indexed memory access +// returns: Encoded ModRM byte, followed by SIB and disp bytes, if appropriate +std::vector<uint8_t> ModRM(const std::string& reg, const std::string& rm, int32_t disp = 0); // Just the number of reg, e.g. for encoding inside primary opcode uint8_t RegNo(const std::string& reg); |