aboutsummaryrefslogtreecommitdiff
path: root/src/vm_ppc.dasc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vm_ppc.dasc22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/vm_ppc.dasc b/src/vm_ppc.dasc
index 3cad37d2..73d60ae4 100644
--- a/src/vm_ppc.dasc
+++ b/src/vm_ppc.dasc
@@ -3015,8 +3015,9 @@ static void build_subroutines(BuildCtx *ctx)
3015 | addi DISPATCH, JGL, -GG_DISP2G-32768 3015 | addi DISPATCH, JGL, -GG_DISP2G-32768
3016 | stp BASE, L->base 3016 | stp BASE, L->base
3017 |1: 3017 |1:
3018 | cmpwi CARG1, 0 3018 | li TMP2, -LUA_ERRERR
3019 | blt >9 // Check for error from exit. 3019 | cmplw CARG1, TMP2
3020 | bge >9 // Check for error from exit.
3020 | lwz LFUNC:RB, FRAME_FUNC(BASE) 3021 | lwz LFUNC:RB, FRAME_FUNC(BASE)
3021 | slwi MULTRES, CARG1, 3 3022 | slwi MULTRES, CARG1, 3
3022 | li TMP2, 0 3023 | li TMP2, 0
@@ -3041,6 +3042,8 @@ static void build_subroutines(BuildCtx *ctx)
3041 | addi PC, PC, 4 3042 | addi PC, PC, 4
3042 | // Assumes TISNIL == ~LJ_VMST_INTERP == -1. 3043 | // Assumes TISNIL == ~LJ_VMST_INTERP == -1.
3043 | stw TISNIL, DISPATCH_GL(vmstate)(DISPATCH) 3044 | stw TISNIL, DISPATCH_GL(vmstate)(DISPATCH)
3045 | cmpwi CARG1, -17 // Static dispatch?
3046 | beq >5
3044 | decode_OPP TMP1, INS 3047 | decode_OPP TMP1, INS
3045 | decode_RA8 RA, INS 3048 | decode_RA8 RA, INS
3046 | lpx TMP0, DISPATCH, TMP1 3049 | lpx TMP0, DISPATCH, TMP1
@@ -3070,6 +3073,21 @@ static void build_subroutines(BuildCtx *ctx)
3070 | add RA, RA, BASE 3073 | add RA, RA, BASE
3071 | bctr 3074 | bctr
3072 | 3075 |
3076 |5: // Dispatch to static entry of original ins replaced by BC_JLOOP.
3077 | lwz TMP1, DISPATCH_J(trace)(DISPATCH)
3078 | decode_RD4 RD, INS
3079 | lwzx TRACE:TMP1, TMP1, RD
3080 | lwz INS, TRACE:TMP1->startins
3081 | decode_OPP TMP1, INS
3082 | addi TMP1, TMP1, GG_DISP2STATIC
3083 | lpx TMP0, DISPATCH, TMP1
3084 | mtctr TMP0
3085 | decode_RB8 RB, INS
3086 | decode_RD8 RD, INS
3087 | decode_RA8 RA, INS
3088 | decode_RC8 RC, INS
3089 | bctr
3090 |
3073 |9: // Rethrow error from the right C frame. 3091 |9: // Rethrow error from the right C frame.
3074 | neg CARG2, CARG1 3092 | neg CARG2, CARG1
3075 | mr CARG1, L 3093 | mr CARG1, L