mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
FFI/x64: Fix struct-by-value calling conventions.
This commit is contained in:
parent
78cc9c889d
commit
6627744752
@ -373,7 +373,7 @@ static int ccall_struct_arg(CCallState *cc, CTState *cts, CType *d, int *rcl,
|
|||||||
dp[0] = dp[1] = 0;
|
dp[0] = dp[1] = 0;
|
||||||
/* Convert to temp. struct. */
|
/* Convert to temp. struct. */
|
||||||
lj_cconv_ct_tv(cts, d, (uint8_t *)dp, o, CCF_ARG(narg));
|
lj_cconv_ct_tv(cts, d, (uint8_t *)dp, o, CCF_ARG(narg));
|
||||||
if (!ccall_struct_reg(cc, dp, rcl)) { /* Register overflow? Pass on stack. */
|
if (ccall_struct_reg(cc, dp, rcl)) { /* Register overflow? Pass on stack. */
|
||||||
MSize nsp = cc->nsp, n = rcl[1] ? 2 : 1;
|
MSize nsp = cc->nsp, n = rcl[1] ? 2 : 1;
|
||||||
if (nsp + n > CCALL_MAXSTACK) return 1; /* Too many arguments. */
|
if (nsp + n > CCALL_MAXSTACK) return 1; /* Too many arguments. */
|
||||||
cc->nsp = nsp + n;
|
cc->nsp = nsp + n;
|
||||||
|
Loading…
Reference in New Issue
Block a user