x64: Properly fix __call metamethod return dispatch.

Reported by Sergey Kaplun. #1110
This commit is contained in:
Mike Pall 2023-11-05 11:31:08 +01:00
parent db944b2b56
commit d133d67c88

View File

@ -1243,7 +1243,7 @@ static void build_subroutines(BuildCtx *ctx)
| mov LFUNC:RB, [RA-8] | mov LFUNC:RB, [RA-8]
| add NARGS:RD, 1 | add NARGS:RD, 1
| // This is fragile. L->base must not move, KBASE must always be defined. | // This is fragile. L->base must not move, KBASE must always be defined.
|.if x64 |.if X64
| cmp KBASEa, rdx // Continue with CALLT if flag set. | cmp KBASEa, rdx // Continue with CALLT if flag set.
|.else |.else
| cmp KBASE, BASE // Continue with CALLT if flag set. | cmp KBASE, BASE // Continue with CALLT if flag set.