diff options
| -rw-r--r-- | main.c | 2 | ||||
| -rw-r--r-- | test/test.sh | 13 |
2 files changed, 8 insertions, 7 deletions
@@ -950,7 +950,7 @@ static void assemble(void) { imm = &v->instr.arg3->imm; opcode = 0x69; prefix = ((v->instr.variant - 14) % 3) == 0 ? 0x66 : -1; - assemblerrm(&v->instr, prefix, opcode, 0); + assemblerrm(&v->instr, prefix, opcode, 1); assemblereloc(imm->v.l, imm->v.c, imm->nbytes, R_X86_64_32); } break; diff --git a/test/test.sh b/test/test.sh index fb7cd99..9f2cc0f 100644 --- a/test/test.sh +++ b/test/test.sh @@ -32,6 +32,7 @@ t () { t "movsbq (%rax), %rbx" +t "movq $-4132994306676758123, %rcx" t "mov \$17293822569102704639, %rax" t "callq *%rax" @@ -220,12 +221,12 @@ t "imulq (%rax), %rax" t "imul %eax, %eax" t "imull (%rax), %eax" -t "imul \$2147483647, %rax, %rax" -t "imul \$2147483647, (%rax), %rax" -t "imul \$2147483647, %eax, %eax" -t "imul \$2147483647, (%rax), %eax" -t "imul \$32767, %ax, %ax" -t "imul \$32767, (%rax), %ax" +t "imul \$2147483647, %rax, %rbx" +t "imul \$2147483647, (%rax), %rbx" +t "imul \$2147483647, %eax, %ebx" +t "imul \$2147483647, (%rax), %ebx" +t "imul \$32767, %ax, %bx" +t "imul \$32767, (%rax), %bx" t "pushq (%r9)" t "pushq %r9" |
