Explorar o código

x64/LJ_GC64: Fix __call metamethod for tailcall.

Mike Pall %!s(int64=9) %!d(string=hai) anos
pai
achega
e77638f922
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/vm_x64.dasc

+ 1 - 1
src/vm_x64.dasc

@@ -1105,11 +1105,11 @@ static void build_subroutines(BuildCtx *ctx)
   |  mov BASE, L:RB->base
   |  mov NARGS:RDd, TMP1d
   |  mov LFUNC:RB, [RA-16]
-  |  cleartp LFUNC:RB
   |  add NARGS:RDd, 1
   |  // This is fragile. L->base must not move, KBASE must always be defined.
   |  cmp KBASE, BASE			// Continue with CALLT if flag set.
   |  je ->BC_CALLT_Z
+  |  cleartp LFUNC:RB
   |  mov BASE, RA
   |  ins_call				// Otherwise call resolved metamethod.
   |