diff options
Diffstat (limited to '')
-rw-r--r-- | src/vm_arm.dasc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vm_arm.dasc b/src/vm_arm.dasc index 0d1ea95f..fc08c658 100644 --- a/src/vm_arm.dasc +++ b/src/vm_arm.dasc | |||
@@ -1195,8 +1195,11 @@ static void build_subroutines(BuildCtx *ctx) | |||
1195 | |//-- Base library: catch errors ---------------------------------------- | 1195 | |//-- Base library: catch errors ---------------------------------------- |
1196 | | | 1196 | | |
1197 | |.ffunc pcall | 1197 | |.ffunc pcall |
1198 | | ldr RB, L->maxstack | ||
1199 | | add INS, BASE, NARGS8:RC | ||
1198 | | ldrb RA, [DISPATCH, #DISPATCH_GL(hookmask)] | 1200 | | ldrb RA, [DISPATCH, #DISPATCH_GL(hookmask)] |
1199 | | cmp NARGS8:RC, #8 | 1201 | | cmp NARGS8:RC, #8 |
1202 | | cmphs RB, INS | ||
1200 | | blo ->fff_fallback | 1203 | | blo ->fff_fallback |
1201 | | tst RA, #HOOK_ACTIVE // Remember active hook before pcall. | 1204 | | tst RA, #HOOK_ACTIVE // Remember active hook before pcall. |
1202 | | mov RB, BASE | 1205 | | mov RB, BASE |
@@ -1207,7 +1210,11 @@ static void build_subroutines(BuildCtx *ctx) | |||
1207 | | b ->vm_call_dispatch | 1210 | | b ->vm_call_dispatch |
1208 | | | 1211 | | |
1209 | |.ffunc_2 xpcall | 1212 | |.ffunc_2 xpcall |
1213 | | ldr RB, L->maxstack | ||
1214 | | add INS, BASE, NARGS8:RC | ||
1210 | | ldrb RA, [DISPATCH, #DISPATCH_GL(hookmask)] | 1215 | | ldrb RA, [DISPATCH, #DISPATCH_GL(hookmask)] |
1216 | | cmp RB, INS | ||
1217 | | blo ->fff_fallback | ||
1211 | | checkfunc CARG4, ->fff_fallback // Traceback must be a function. | 1218 | | checkfunc CARG4, ->fff_fallback // Traceback must be a function. |
1212 | | mov RB, BASE | 1219 | | mov RB, BASE |
1213 | | strd CARG12, [BASE, #8] // Swap function and traceback. | 1220 | | strd CARG12, [BASE, #8] // Swap function and traceback. |