diff options
| author | Andrew Chambers <[email protected]> | 2021-10-14 23:48:44 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-14 23:48:44 +1300 |
| commit | e80556c2e0f516a6b584a354b491bf353e96830e (patch) | |
| tree | c28b862c6aca411f3615336772b6a1cf05255465 | |
| parent | 3d3adabbcde9576de5ef7a08defd99c7974971cb (diff) | |
Fix incorrect arg order.
| -rw-r--r-- | main.c | 2 | ||||
| -rw-r--r-- | test/test.sh | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -941,7 +941,7 @@ static void assemble(void) { } else if (v->instr.variant < 14) { opcode = 0x01000faf; prefix = ((v->instr.variant - 8) % 3) == 0 ? 0x66 : -1; - assemblerrm(&v->instr, prefix, opcode, 0); + assemblerrm(&v->instr, prefix, opcode, 1); } else { const Imm *imm; imm = &v->instr.arg3->imm; diff --git a/test/test.sh b/test/test.sh index 9734915..ba4a036 100644 --- a/test/test.sh +++ b/test/test.sh @@ -231,10 +231,10 @@ t "imul %rax" t "imulq (%rax)" t "imulq (%rip)" -t "imul %rax, %rax" -t "imulq (%rax), %rax" -t "imul %eax, %eax" -t "imull (%rax), %eax" +t "imul %rax, %rbx" +t "imulq (%rax), %rbx" +t "imul %eax, %ebx" +t "imull (%rax), %ebx" t "imul \$2147483647, %rax, %rbx" t "imul \$2147483647, (%rax), %rbx" |
