diff options
| author | Andrew Chambers <[email protected]> | 2021-10-11 12:03:17 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-11 12:03:17 +1300 |
| commit | 01b5a69f2d7e7ec041064e88d0789ad6d6bc92eb (patch) | |
| tree | c93bfa1a6bda4960a0361ef252e48c7fae08ec6e | |
| parent | dd694b1efdf09eeb063807a94305c5e933d4fea9 (diff) | |
Add more references.
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | main.c | 8 | ||||
| -rw-r--r-- | test/test.sh | 2 |
3 files changed, 4 insertions, 7 deletions
@@ -29,6 +29,7 @@ cc -O2 *.c -o minias # Resources +- [intel reference](https://software.intel.com/content/dam/develop/external/us/en/documents-tps/325383-sdm-vol-2abcd.pdf) - Especially chapter 2 section 1. - [elf spec](https://refspecs.linuxfoundation.org/elf/elf.pdf) - [goas](https://github.com/DQNEO/goas) - [neatas](https://repo.or.cz/neatas.git) @@ -500,12 +500,8 @@ static void assemblemem(Memarg *memarg, uint8_t rexw, Opcode opcode, } /* If our base is a bp register, we must use the index instead. */ - if ((base & 7) == 5) { - if (memarg->index == ASM_NO_REG) { - index = base; - } else { - // lfatal("bp cannot be used as an addressing base"); - } + if ((base & 7) == 5 && memarg->index == ASM_NO_REG) { + index = base; } switch (memarg->scale) { diff --git a/test/test.sh b/test/test.sh index a5ffc12..574bfad 100644 --- a/test/test.sh +++ b/test/test.sh @@ -216,7 +216,7 @@ do t "${op}l %e${r}x, %eax" t "${op}q %r${r}x, %rax" - if test "$op" = "test" # m -> variants are not supported by test + if test "$op" = "test" # m -> r variants are not supported by test then continue fi |
