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 f276745c..8760a1f6 100644
--- a/src/vm_mips.dasc
+++ b/src/vm_mips.dasc
@@ -1374,9 +1374,13 @@ static void build_subroutines(BuildCtx *ctx)
1374 |//-- Base library: catch errors ---------------------------------------- 1374 |//-- Base library: catch errors ----------------------------------------
1375 | 1375 |
1376 |.ffunc pcall 1376 |.ffunc pcall
1377 | lw TMP1, L->maxstack
1378 | addu TMP2, BASE, NARGS8:RC
1377 | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) 1379 | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH)
1378 | beqz NARGS8:RC, ->fff_fallback 1380 | beqz NARGS8:RC, ->fff_fallback
1379 | move TMP2, BASE 1381 |. sltu AT, TMP1, TMP2
1382 | bnez AT, ->fff_fallback
1383 |. move TMP2, BASE
1380 | addiu BASE, BASE, 8 1384 | addiu BASE, BASE, 8
1381 | // Remember active hook before pcall. 1385 | // Remember active hook before pcall.
1382 | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT 1386 | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT
@@ -1386,8 +1390,12 @@ static void build_subroutines(BuildCtx *ctx)
1386 |. addiu NARGS8:RC, NARGS8:RC, -8 1390 |. addiu NARGS8:RC, NARGS8:RC, -8
1387 | 1391 |
1388 |.ffunc xpcall 1392 |.ffunc xpcall
1393 | lw TMP1, L->maxstack
1394 | addu TMP2, BASE, NARGS8:RC
1389 | sltiu AT, NARGS8:RC, 16 1395 | sltiu AT, NARGS8:RC, 16
1390 | lw CARG4, 8+HI(BASE) 1396 | lw CARG4, 8+HI(BASE)
1397 | sltu TMP1, TMP1, TMP2
1398 | or AT, AT, TMP1
1391 | bnez AT, ->fff_fallback 1399 | bnez AT, ->fff_fallback
1392 |. lw CARG3, 8+LO(BASE) 1400 |. lw CARG3, 8+LO(BASE)
1393 | lw CARG1, LO(BASE) 1401 | lw CARG1, LO(BASE)