Merge pull request #379 from jlj/master

Xcode build improvements
This commit is contained in:
Anthony Green
2017-10-25 13:05:53 -04:00
committed by GitHub
5 changed files with 394 additions and 23 deletions

View File

@@ -231,7 +231,7 @@ is_vfp_type (const ffi_type *ty)
/* All tests succeeded. Encode the result. */
done:
return candidate * 4 + (4 - ele_count);
return candidate * 4 + (4 - (int)ele_count);
}
/* Representation of the procedure call argument marshalling
@@ -528,7 +528,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
}
/* Round the stack up to a multiple of the stack alignment requirement. */
cif->bytes = FFI_ALIGN(bytes, 16);
cif->bytes = (unsigned) FFI_ALIGN(bytes, 16);
cif->flags = flags;
#if defined (__APPLE__)
cif->aarch64_nfixedargs = 0;

View File

@@ -506,7 +506,7 @@ open_temp_exec_file_dir (const char *dir)
}
#endif
lendir = strlen (dir);
lendir = (int) strlen (dir);
tempname = __builtin_alloca (lendir + sizeof (suffix));
if (!tempname)

View File

@@ -397,7 +397,8 @@ ffi_prep_cif_machdep_efi64(ffi_cif *cif);
ffi_status
ffi_prep_cif_machdep (ffi_cif *cif)
{
int gprcount, ssecount, i, avn, ngpr, nsse, flags;
int gprcount, ssecount, i, avn, ngpr, nsse;
unsigned flags;
enum x86_64_reg_class classes[MAX_CLASSES];
size_t bytes, n, rtype_size;
ffi_type *rtype;
@@ -498,7 +499,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
case FFI_TYPE_SINT32:
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
flags = UNIX64_RET_ST_RAX_RDX | (rtype_size << UNIX64_SIZE_SHIFT);
flags = UNIX64_RET_ST_RAX_RDX | ((unsigned) rtype_size << UNIX64_SIZE_SHIFT);
break;
case FFI_TYPE_FLOAT:
flags = UNIX64_RET_XMM64;
@@ -546,7 +547,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
flags |= UNIX64_FLAG_XMM_ARGS;
cif->flags = flags;
cif->bytes = FFI_ALIGN (bytes, 8);
cif->bytes = (unsigned) FFI_ALIGN (bytes, 8);
return FFI_OK;
}