From 35a4dd6f794e3ab7d2f41658212727ee85090448 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 28 Nov 2024 16:33:18 +0100 Subject: [PATCH] MIPS64: Fix pcall() error case. Thanks to Sergey Kaplun. #1308 --- src/vm_mips64.dasc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vm_mips64.dasc b/src/vm_mips64.dasc index a8d20413..1f0118ec 100644 --- a/src/vm_mips64.dasc +++ b/src/vm_mips64.dasc @@ -1420,9 +1420,10 @@ static void build_subroutines(BuildCtx *ctx) | sltu AT, TMP1, TMP2 | bnez AT, ->fff_fallback |. lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) - | daddiu NARGS8:RC, NARGS8:RC, -8 - | bltz NARGS8:RC, ->fff_fallback + | daddiu NARGS8:TMP0, NARGS8:RC, -8 + | bltz NARGS8:TMP0, ->fff_fallback |. move TMP2, BASE + | move NARGS8:RC, NARGS8:TMP0 | daddiu BASE, BASE, 16 | // Remember active hook before pcall. | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT