]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
ARM64: Fix pcall() error case.
authorMike Pall <mike>
Wed, 27 Oct 2021 19:56:07 +0000 (21:56 +0200)
committerMike Pall <mike>
Wed, 27 Oct 2021 19:56:07 +0000 (21:56 +0200)
Reported by Alex Orlenko.

src/vm_arm64.dasc

index c7090ca376a4ac80f705b8520c6789aff524d9f2..eb87857f08974543852d8287f79a4d5229579fbe 100644 (file)
@@ -1164,9 +1164,10 @@ static void build_subroutines(BuildCtx *ctx)
   |//-- Base library: catch errors ----------------------------------------
   |
   |.ffunc pcall
+  |   cmp NARGS8:RC, #8
   |  ldrb TMP0w, GL->hookmask
-  |   subs NARGS8:RC, NARGS8:RC, #8
   |   blo ->fff_fallback
+  |   sub NARGS8:RC, NARGS8:RC, #8
   |    mov RB, BASE
   |    add BASE, BASE, #16
   |  ubfx TMP0w, TMP0w, #HOOK_ACTIVE_SHIFT, #1