aboutsummaryrefslogtreecommitdiff
path: root/src/vm_x64.dasc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vm_x64.dasc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/vm_x64.dasc b/src/vm_x64.dasc
index 03d96557..5983eeed 100644
--- a/src/vm_x64.dasc
+++ b/src/vm_x64.dasc
@@ -2453,7 +2453,7 @@ static void build_subroutines(BuildCtx *ctx)
2453 | mov r12, [RA] 2453 | mov r12, [RA]
2454 | mov rsp, RA // Reposition stack to C frame. 2454 | mov rsp, RA // Reposition stack to C frame.
2455 |.endif 2455 |.endif
2456 | test RDd, RDd; js >9 // Check for error from exit. 2456 | cmp RDd, -LUA_ERRERR; jae >9 // Check for error from exit.
2457 | mov L:RB, SAVE_L 2457 | mov L:RB, SAVE_L
2458 | mov MULTRES, RDd 2458 | mov MULTRES, RDd
2459 | mov LFUNC:KBASE, [BASE-16] 2459 | mov LFUNC:KBASE, [BASE-16]
@@ -2469,6 +2469,8 @@ static void build_subroutines(BuildCtx *ctx)
2469 | movzx OP, RCL 2469 | movzx OP, RCL
2470 | add PC, 4 2470 | add PC, 4
2471 | shr RCd, 16 2471 | shr RCd, 16
2472 | cmp MULTRES, -17 // Static dispatch?
2473 | je >5
2472 | cmp OP, BC_FUNCF // Function header? 2474 | cmp OP, BC_FUNCF // Function header?
2473 | jb >3 2475 | jb >3
2474 | cmp OP, BC_FUNCC+2 // Fast function? 2476 | cmp OP, BC_FUNCC+2 // Fast function?
@@ -2491,6 +2493,15 @@ static void build_subroutines(BuildCtx *ctx)
2491 | mov KBASE, [KBASE+PC2PROTO(k)] 2493 | mov KBASE, [KBASE+PC2PROTO(k)]
2492 | jmp <2 2494 | jmp <2
2493 | 2495 |
2496 |5: // Dispatch to static entry of original ins replaced by BC_JLOOP.
2497 | mov RA, [DISPATCH+DISPATCH_J(trace)]
2498 | mov TRACE:RA, [RA+RD*8]
2499 | mov RCd, TRACE:RA->startins
2500 | movzx RAd, RCH
2501 | movzx OP, RCL
2502 | shr RCd, 16
2503 | jmp aword [DISPATCH+OP*8+GG_DISP2STATIC]
2504 |
2494 |9: // Rethrow error from the right C frame. 2505 |9: // Rethrow error from the right C frame.
2495 | mov CARG2d, RDd 2506 | mov CARG2d, RDd
2496 | mov CARG1, L:RB 2507 | mov CARG1, L:RB