mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53:26 +00:00
FFI: Fix field alignment for iOS.
This commit is contained in:
parent
fb8b87e818
commit
704752c612
@ -1202,8 +1202,8 @@ static CTSize cp_field_align(CPState *cp, CType *ct, CTInfo info)
|
|||||||
{
|
{
|
||||||
CTSize align = ctype_align(info);
|
CTSize align = ctype_align(info);
|
||||||
UNUSED(cp); UNUSED(ct);
|
UNUSED(cp); UNUSED(ct);
|
||||||
#if LJ_TARGET_X86 && !LJ_ABI_WIN
|
#if (LJ_TARGET_X86 && !LJ_ABI_WIN) || (LJ_TARGET_ARM && __APPLE__)
|
||||||
/* The SYSV i386 ABI limits alignment of non-vector fields to 4 bytes. */
|
/* The SYSV i386 and iOS ABIs limit alignment of non-vector fields to 2^2. */
|
||||||
if (align > 2 && !(info & CTFP_ALIGNED)) {
|
if (align > 2 && !(info & CTFP_ALIGNED)) {
|
||||||
if (ctype_isarray(info) && !(info & CTF_VECTOR)) {
|
if (ctype_isarray(info) && !(info & CTF_VECTOR)) {
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user