summaryrefslogtreecommitdiffhomepage
path: root/asm/intel64/codes.h
diff options
context:
space:
mode:
Diffstat (limited to 'asm/intel64/codes.h')
-rw-r--r--asm/intel64/codes.h4
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);