mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
luajit-2.1: fix fp parameter passing for ppc64
The POWER 64-bit LE ABI calls for floating point function arguments beyond the 8th to be passed via floating point registers and also to reserve a slot in the parameter save area on the stack. The PPC CCALL_HANDLE_REGARG correctly includes the values in FPRs, but neglects to reserve corresponding slots when spilling into the save area.
This commit is contained in:
parent
c00253828a
commit
f7dcabbe36
@ -390,8 +390,13 @@
|
||||
if (nfpr + 1 <= CCALL_NARG_FPR) { \
|
||||
dp = &cc->fpr[nfpr]; \
|
||||
nfpr += 1; \
|
||||
ngpr += 1; /* align GPRs */ \
|
||||
d = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ \
|
||||
if (ngpr + 1 <= maxgpr) \
|
||||
ngpr += 1; /* align GPRs */ \
|
||||
else if (nsp + 1 <= CCALL_MAXSTACK) \
|
||||
nsp += 1; /* align save area slots */ \
|
||||
else \
|
||||
goto err_nyi; /* Too many args */ \
|
||||
goto done; \
|
||||
} \
|
||||
} else { /* Try to pass argument in GPRs. */ \
|
||||
|
Loading…
Reference in New Issue
Block a user