diff options
-rw-r--r-- | src/vm_arm.dasc | 7 | ||||
-rw-r--r-- | src/vm_x86.dasc | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/vm_arm.dasc b/src/vm_arm.dasc index 9db3b827..8f723f21 100644 --- a/src/vm_arm.dasc +++ b/src/vm_arm.dasc | |||
@@ -543,9 +543,8 @@ static void build_subroutines(BuildCtx *ctx) | |||
543 | |1: | 543 | |1: |
544 | | beq ->cont_ffi_callback // cont = 1: return from FFI callback. | 544 | | beq ->cont_ffi_callback // cont = 1: return from FFI callback. |
545 | | // cont = 0: tailcall from C function. | 545 | | // cont = 0: tailcall from C function. |
546 | | ldr CARG3, [BASE, FRAME_FUNC] | 546 | | sub CARG4, CARG4, #16 |
547 | | sub CARG4, CARG4, #16 | 547 | | sub RC, CARG4, BASE |
548 | | sub RC, CARG4, BASE | ||
549 | | b ->vm_call_tail | 548 | | b ->vm_call_tail |
550 | |.endif | 549 | |.endif |
551 | | | 550 | | |
@@ -3749,7 +3748,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
3749 | case BC_TSETR: | 3748 | case BC_TSETR: |
3750 | | decode_RB8 RB, INS | 3749 | | decode_RB8 RB, INS |
3751 | | decode_RC8 RC, INS | 3750 | | decode_RC8 RC, INS |
3752 | | // RA = dst*8, RB = table*8, RC = key*8 | 3751 | | // RA = src*8, RB = table*8, RC = key*8 |
3753 | | ldr TAB:CARG2, [BASE, RB] | 3752 | | ldr TAB:CARG2, [BASE, RB] |
3754 | | ldr CARG3, [BASE, RC] | 3753 | | ldr CARG3, [BASE, RC] |
3755 | | ldrb INS, TAB:CARG2->marked | 3754 | | ldrb INS, TAB:CARG2->marked |
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc index 7b5abdd5..777985a4 100644 --- a/src/vm_x86.dasc +++ b/src/vm_x86.dasc | |||
@@ -4649,8 +4649,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
4649 | | jnz <4 | 4649 | | jnz <4 |
4650 | | movzx RA, PC_RA | 4650 | | movzx RA, PC_RA |
4651 | | not RAa | 4651 | | not RAa |
4652 | | lea RA, [BASE+RA*8] | 4652 | | mov LFUNC:KBASE, [BASE+RA*8-8] // Need to prepare KBASE. |
4653 | | mov LFUNC:KBASE, [RA-8] // Need to prepare KBASE. | ||
4654 | | mov KBASE, LFUNC:KBASE->pc | 4653 | | mov KBASE, LFUNC:KBASE->pc |
4655 | | mov KBASE, [KBASE+PC2PROTO(k)] | 4654 | | mov KBASE, [KBASE+PC2PROTO(k)] |
4656 | | jmp <4 | 4655 | | jmp <4 |