From c9cb051fae190acfc36813e4a23759fb9b9c3df3 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 16 Nov 2020 12:48:44 +0100 Subject: Implement hierarchical evaluation (WIP) --- asm/intel64/codes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'asm/intel64/codes.h') 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 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 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); -- cgit v1.2.3