MIPS64: Fix pcall() error case.

Thanks to Sergey Kaplun. #1308
This commit is contained in:
Mike Pall 2024-11-28 16:33:18 +01:00
parent 4788e6f92a
commit 35a4dd6f79

View File

@ -1420,9 +1420,10 @@ static void build_subroutines(BuildCtx *ctx)
| sltu AT, TMP1, TMP2 | sltu AT, TMP1, TMP2
| bnez AT, ->fff_fallback | bnez AT, ->fff_fallback
|. lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) |. lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH)
| daddiu NARGS8:RC, NARGS8:RC, -8 | daddiu NARGS8:TMP0, NARGS8:RC, -8
| bltz NARGS8:RC, ->fff_fallback | bltz NARGS8:TMP0, ->fff_fallback
|. move TMP2, BASE |. move TMP2, BASE
| move NARGS8:RC, NARGS8:TMP0
| daddiu BASE, BASE, 16 | daddiu BASE, BASE, 16
| // Remember active hook before pcall. | // Remember active hook before pcall.
| srl TMP3, TMP3, HOOK_ACTIVE_SHIFT | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT