mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
a946f678d5
@ -583,22 +583,26 @@ static unsigned int ccall_classify_struct(CTState *cts, CType *ct, CType *ctf)
|
|||||||
unsigned int r = 0, n = 0, isu = (ct->info & CTF_UNION);
|
unsigned int r = 0, n = 0, isu = (ct->info & CTF_UNION);
|
||||||
if ((ctf->info & CTF_VARARG)) goto noth;
|
if ((ctf->info & CTF_VARARG)) goto noth;
|
||||||
while (ct->sib) {
|
while (ct->sib) {
|
||||||
|
CType *sct;
|
||||||
ct = ctype_get(cts, ct->sib);
|
ct = ctype_get(cts, ct->sib);
|
||||||
if (ctype_isfield(ct->info)) {
|
if (ctype_isfield(ct->info)) {
|
||||||
CType *sct = ctype_rawchild(cts, ct);
|
sct = ctype_rawchild(cts, ct);
|
||||||
if (ctype_isfp(sct->info)) {
|
if (ctype_isfp(sct->info)) {
|
||||||
r |= sct->size;
|
r |= sct->size;
|
||||||
if (!isu) n++; else if (n == 0) n = 1;
|
if (!isu) n++; else if (n == 0) n = 1;
|
||||||
} else if (ctype_iscomplex(sct->info)) {
|
} else if (ctype_iscomplex(sct->info)) {
|
||||||
r |= (sct->size >> 1);
|
r |= (sct->size >> 1);
|
||||||
if (!isu) n += 2; else if (n < 2) n = 2;
|
if (!isu) n += 2; else if (n < 2) n = 2;
|
||||||
|
} else if (ctype_isstruct(sct->info)) {
|
||||||
|
goto substruct;
|
||||||
} else {
|
} else {
|
||||||
goto noth;
|
goto noth;
|
||||||
}
|
}
|
||||||
} else if (ctype_isbitfield(ct->info)) {
|
} else if (ctype_isbitfield(ct->info)) {
|
||||||
goto noth;
|
goto noth;
|
||||||
} else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) {
|
} else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) {
|
||||||
CType *sct = ctype_rawchild(cts, ct);
|
sct = ctype_rawchild(cts, ct);
|
||||||
|
substruct:
|
||||||
if (sct->size > 0) {
|
if (sct->size > 0) {
|
||||||
unsigned int s = ccall_classify_struct(cts, sct, ctf);
|
unsigned int s = ccall_classify_struct(cts, sct, ctf);
|
||||||
if (s <= 1) goto noth;
|
if (s <= 1) goto noth;
|
||||||
|
Loading…
Reference in New Issue
Block a user