aboutsummaryrefslogtreecommitdiff
path: root/src/vm_mips.dasc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vm_mips.dasc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc
index 41ed303d..aad4fccf 100644
--- a/src/vm_mips.dasc
+++ b/src/vm_mips.dasc
@@ -2046,13 +2046,14 @@ static void build_subroutines(BuildCtx *ctx)
2046 | st_vmstate 2046 | st_vmstate
2047 | sw TMP2, 16+32*8+29*4(sp) // Store sp in RID_SP. 2047 | sw TMP2, 16+32*8+29*4(sp) // Store sp in RID_SP.
2048 | lw L, DISPATCH_GL(jit_L)(DISPATCH) 2048 | lw L, DISPATCH_GL(jit_L)(DISPATCH)
2049 | lw BASE, DISPATCH_GL(jit_base)(DISPATCH) 2049 | lw BASE, DISPATCH_GL(jit_base)(DISPATCH)
2050 | load_got lj_trace_exit 2050 | load_got lj_trace_exit
2051 | sw L, DISPATCH_J(L)(DISPATCH) 2051 | sw L, DISPATCH_J(L)(DISPATCH)
2052 | sw ra, DISPATCH_J(parent)(DISPATCH) // Store trace number. 2052 | sw ra, DISPATCH_J(parent)(DISPATCH) // Store trace number.
2053 | sw BASE, L->base
2053 | sw TMP1, DISPATCH_J(exitno)(DISPATCH) // Store exit number. 2054 | sw TMP1, DISPATCH_J(exitno)(DISPATCH) // Store exit number.
2054 | addiu CARG1, DISPATCH, GG_DISP2J 2055 | addiu CARG1, DISPATCH, GG_DISP2J
2055 | sw BASE, L->base 2056 | sw r0, DISPATCH_GL(jit_base)(DISPATCH)
2056 | call_intern lj_trace_exit // (jit_State *J, ExitState *ex) 2057 | call_intern lj_trace_exit // (jit_State *J, ExitState *ex)
2057 |. addiu CARG2, sp, 16 2058 |. addiu CARG2, sp, 16
2058 | // Returns MULTRES (unscaled) or negated error code. 2059 | // Returns MULTRES (unscaled) or negated error code.
@@ -2068,7 +2069,8 @@ static void build_subroutines(BuildCtx *ctx)
2068 |.if JIT 2069 |.if JIT
2069 | // CRET1 = MULTRES or negated error code, BASE, PC and JGL set. 2070 | // CRET1 = MULTRES or negated error code, BASE, PC and JGL set.
2070 | lw L, SAVE_L 2071 | lw L, SAVE_L
2071 | addiu DISPATCH, JGL, -GG_DISP2G-32768 2072 | addiu DISPATCH, JGL, -GG_DISP2G-32768
2073 | sw BASE, L->base
2072 |1: 2074 |1:
2073 | bltz CRET1, >3 // Check for error from exit. 2075 | bltz CRET1, >3 // Check for error from exit.
2074 |. lw LFUNC:TMP1, FRAME_FUNC(BASE) 2076 |. lw LFUNC:TMP1, FRAME_FUNC(BASE)
@@ -2078,7 +2080,7 @@ static void build_subroutines(BuildCtx *ctx)
2078 | sw MULTRES, SAVE_MULTRES 2080 | sw MULTRES, SAVE_MULTRES
2079 | mtc1 TMP3, TOBIT 2081 | mtc1 TMP3, TOBIT
2080 | lw TMP1, LFUNC:TMP1->pc 2082 | lw TMP1, LFUNC:TMP1->pc
2081 | sw r0, DISPATCH_GL(jit_L)(DISPATCH) 2083 | sw r0, DISPATCH_GL(jit_base)(DISPATCH)
2082 | lw KBASE, PC2PROTO(k)(TMP1) 2084 | lw KBASE, PC2PROTO(k)(TMP1)
2083 | cvt.d.s TOBIT, TOBIT 2085 | cvt.d.s TOBIT, TOBIT
2084 | // Modified copy of ins_next which handles function header dispatch, too. 2086 | // Modified copy of ins_next which handles function header dispatch, too.