diff options
| author | Andrew Chambers <[email protected]> | 2021-10-20 21:17:13 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-20 21:17:13 +1300 |
| commit | 5a77e2180415ec70115597d9f950992032a1e239 (patch) | |
| tree | 858d2407b5f6cd51ef7b9e441535c9eb41f1a5c1 /main.c | |
| parent | 54921bd8f385a1a88f203c362252389045e81fbf (diff) | |
Document assemblemem.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -345,12 +345,16 @@ assemblereloc(const char *l, int64_t c, int nbytes, int type) assembleconstant(c, nbytes); } -/* Assemble a r <-> mem operation. */ +/* Assemble a r <-> mem operation. + + In order to understand this function, you should check the intel + manual which has tables showing the appropriate values of the modregrm + byte and sib byte for the different addressing modes. +*/ static void assemblemem(const Memarg *memarg, Rex rex, VarBytes prefix, VarBytes opcode, uint8_t reg, int32_t nexti) { - uint8_t mod, rm, scale, index, base; /* Rip relative addressing. */ |
