diff options
| author | Mike Pall <mike> | 2011-08-25 11:10:39 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2011-08-25 11:10:39 +0200 |
| commit | 6627744752f1769cec7bc3492496130175145957 (patch) | |
| tree | a9cbc35d902be7238f31fed29ca68244c7f0b897 /src | |
| parent | 78cc9c889d8df0ccdb15e1b63e7a5aa104c58b85 (diff) | |
| download | luajit-6627744752f1769cec7bc3492496130175145957.tar.gz luajit-6627744752f1769cec7bc3492496130175145957.tar.bz2 luajit-6627744752f1769cec7bc3492496130175145957.zip | |
FFI/x64: Fix struct-by-value calling conventions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_ccall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_ccall.c b/src/lj_ccall.c index 3ec5b1cc..783f1d5d 100644 --- a/src/lj_ccall.c +++ b/src/lj_ccall.c | |||
| @@ -373,7 +373,7 @@ static int ccall_struct_arg(CCallState *cc, CTState *cts, CType *d, int *rcl, | |||
| 373 | dp[0] = dp[1] = 0; | 373 | dp[0] = dp[1] = 0; |
| 374 | /* Convert to temp. struct. */ | 374 | /* Convert to temp. struct. */ |
| 375 | lj_cconv_ct_tv(cts, d, (uint8_t *)dp, o, CCF_ARG(narg)); | 375 | lj_cconv_ct_tv(cts, d, (uint8_t *)dp, o, CCF_ARG(narg)); |
| 376 | if (!ccall_struct_reg(cc, dp, rcl)) { /* Register overflow? Pass on stack. */ | 376 | if (ccall_struct_reg(cc, dp, rcl)) { /* Register overflow? Pass on stack. */ |
| 377 | MSize nsp = cc->nsp, n = rcl[1] ? 2 : 1; | 377 | MSize nsp = cc->nsp, n = rcl[1] ? 2 : 1; |
| 378 | if (nsp + n > CCALL_MAXSTACK) return 1; /* Too many arguments. */ | 378 | if (nsp + n > CCALL_MAXSTACK) return 1; /* Too many arguments. */ |
| 379 | cc->nsp = nsp + n; | 379 | cc->nsp = nsp + n; |
