From 375efafb6aeb486ff2b079e8464d4b746ba4f213 Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Tue, 19 Oct 2021 15:51:57 +1300 Subject: Restore memory calls. --- main.c | 5 ++--- test/test.sh | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 6c3c710..f12ece5 100644 --- a/main.c +++ b/main.c @@ -488,9 +488,8 @@ assemblecall(const Call* call) if (call->indirect) { if (call->target.indirect->kind == ASM_MEMARG) { - rex = (Rex){ 0 }; - abort(); // assemblemem(&call->target.indirect->memarg, rex, -1, - // 0xff, 0x02); + rex = (Rex){0}; + assemblemem(&call->target.indirect->memarg, rex, -1, 0xff, 0x02, 0); } else { rm = regbits(call->target.indirect->kind); rex = (Rex){ .b = !!(rm & (1 << 3)) }; diff --git a/test/test.sh b/test/test.sh index 5ef1266..0b959ae 100644 --- a/test/test.sh +++ b/test/test.sh @@ -40,6 +40,7 @@ t "movq $-4132994306676758123, %rcx" t "mov \$17293822569102704639, %rax" t "callq *%rax" t "callq *%r10" +t "callq *(%r10)" t "movb %r11b, (%rsi, %r12, 1)" for r in rax r10 -- cgit v1.2.3