aboutsummaryrefslogtreecommitdiff
path: root/src/vm_mips.dasc
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm_mips.dasc')
-rw-r--r--src/vm_mips.dasc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc
index f6f801f2..c4c0a416 100644
--- a/src/vm_mips.dasc
+++ b/src/vm_mips.dasc
@@ -1244,9 +1244,13 @@ static void build_subroutines(BuildCtx *ctx)
1244 |//-- Base library: catch errors ---------------------------------------- 1244 |//-- Base library: catch errors ----------------------------------------
1245 | 1245 |
1246 |.ffunc pcall 1246 |.ffunc pcall
1247 | lw TMP1, L->maxstack
1248 | addu TMP2, BASE, NARGS8:RC
1247 | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) 1249 | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH)
1248 | beqz NARGS8:RC, ->fff_fallback 1250 | beqz NARGS8:RC, ->fff_fallback
1249 | move TMP2, BASE 1251 |. sltu AT, TMP1, TMP2
1252 | bnez AT, ->fff_fallback
1253 |. move TMP2, BASE
1250 | addiu BASE, BASE, 8 1254 | addiu BASE, BASE, 8
1251 | // Remember active hook before pcall. 1255 | // Remember active hook before pcall.
1252 | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT 1256 | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT
@@ -1256,8 +1260,12 @@ static void build_subroutines(BuildCtx *ctx)
1256 |. addiu NARGS8:RC, NARGS8:RC, -8 1260 |. addiu NARGS8:RC, NARGS8:RC, -8
1257 | 1261 |
1258 |.ffunc xpcall 1262 |.ffunc xpcall
1263 | lw TMP1, L->maxstack
1264 | addu TMP2, BASE, NARGS8:RC
1259 | sltiu AT, NARGS8:RC, 16 1265 | sltiu AT, NARGS8:RC, 16
1260 | lw CARG4, 8+HI(BASE) 1266 | lw CARG4, 8+HI(BASE)
1267 | sltu TMP1, TMP1, TMP2
1268 | or AT, AT, TMP1
1261 | bnez AT, ->fff_fallback 1269 | bnez AT, ->fff_fallback
1262 |. ldc1 FARG2, 8(BASE) 1270 |. ldc1 FARG2, 8(BASE)
1263 | ldc1 FARG1, 0(BASE) 1271 | ldc1 FARG1, 0(BASE)