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:
Brian W. Hart 2016-08-31 11:04:24 -05:00 committed by Gustavo Serra Scalet
parent c00253828a
commit f7dcabbe36

View File

@ -390,8 +390,13 @@
if (nfpr + 1 <= CCALL_NARG_FPR) { \ if (nfpr + 1 <= CCALL_NARG_FPR) { \
dp = &cc->fpr[nfpr]; \ dp = &cc->fpr[nfpr]; \
nfpr += 1; \ nfpr += 1; \
ngpr += 1; /* align GPRs */ \
d = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ \ 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; \ goto done; \
} \ } \
} else { /* Try to pass argument in GPRs. */ \ } else { /* Try to pass argument in GPRs. */ \