aboutsummaryrefslogtreecommitdiff
path: root/src/vm_x86.dasc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vm_x86.dasc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc
index 18ca87b5..f7847762 100644
--- a/src/vm_x86.dasc
+++ b/src/vm_x86.dasc
@@ -2902,7 +2902,7 @@ static void build_subroutines(BuildCtx *ctx)
2902 | mov r13, TMPa 2902 | mov r13, TMPa
2903 | mov r12, TMPQ 2903 | mov r12, TMPQ
2904 |.endif 2904 |.endif
2905 | test RD, RD; js >9 // Check for error from exit. 2905 | cmp RD, -LUA_ERRERR; jae >9 // Check for error from exit.
2906 | mov L:RB, SAVE_L 2906 | mov L:RB, SAVE_L
2907 | mov MULTRES, RD 2907 | mov MULTRES, RD
2908 | mov LFUNC:KBASE, [BASE-8] 2908 | mov LFUNC:KBASE, [BASE-8]
@@ -2917,6 +2917,8 @@ static void build_subroutines(BuildCtx *ctx)
2917 | movzx OP, RCL 2917 | movzx OP, RCL
2918 | add PC, 4 2918 | add PC, 4
2919 | shr RC, 16 2919 | shr RC, 16
2920 | cmp MULTRES, -17 // Static dispatch?
2921 | je >5
2920 | cmp OP, BC_FUNCF // Function header? 2922 | cmp OP, BC_FUNCF // Function header?
2921 | jb >3 2923 | jb >3
2922 | cmp OP, BC_FUNCC+2 // Fast function? 2924 | cmp OP, BC_FUNCC+2 // Fast function?
@@ -2942,6 +2944,19 @@ static void build_subroutines(BuildCtx *ctx)
2942 | mov KBASE, [KBASE+PC2PROTO(k)] 2944 | mov KBASE, [KBASE+PC2PROTO(k)]
2943 | jmp <2 2945 | jmp <2
2944 | 2946 |
2947 |5: // Dispatch to static entry of original ins replaced by BC_JLOOP.
2948 | mov RA, [DISPATCH+DISPATCH_J(trace)]
2949 | mov TRACE:RA, [RA+RD*4]
2950 | mov RC, TRACE:RA->startins
2951 | movzx RA, RCH
2952 | movzx OP, RCL
2953 | shr RC, 16
2954 |.if X64
2955 | jmp aword [DISPATCH+OP*8+GG_DISP2STATIC]
2956 |.else
2957 | jmp aword [DISPATCH+OP*4+GG_DISP2STATIC]
2958 |.endif
2959 |
2945 |9: // Rethrow error from the right C frame. 2960 |9: // Rethrow error from the right C frame.
2946 | mov FCARG2, RD 2961 | mov FCARG2, RD
2947 | mov FCARG1, L:RB 2962 | mov FCARG1, L:RB