ARM VFP fix for old toolchains

This commit is contained in:
Anthony Green
2012-03-30 00:40:18 -04:00
parent 7c5e60b5f4
commit e1539266e6
10 changed files with 6186 additions and 1 deletions

View File

@@ -251,8 +251,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
break;
case FFI_VFP:
#ifdef __ARM_EABI__
ffi_call_VFP (fn, &ecif, cif->bytes, cif->flags, ecif.rvalue);
break;
#endif
default:
FFI_ASSERT(0);
@@ -609,8 +611,10 @@ ffi_prep_closure_loc (ffi_closure* closure,
if (cif->abi == FFI_SYSV)
closure_func = &ffi_closure_SYSV;
#ifdef __ARM_EABI__
else if (cif->abi == FFI_VFP)
closure_func = &ffi_closure_VFP;
#endif
else
return FFI_BAD_ABI;

View File

@@ -334,7 +334,9 @@ ARM_FUNC_START ffi_closure_SYSV
/* Below are VFP hard-float ABI call and closure implementations.
Add VFP FPU directive here. */
Add VFP FPU directive here. This is only compiled into the library
under EABI. */
#ifdef __ARM_EABI__
.fpu vfp
@ r0: fn
@@ -491,6 +493,7 @@ ARM_FUNC_START ffi_closure_VFP
.ffi_closure_VFP_end:
UNWIND .fnend
.size CNAME(ffi_closure_VFP),.ffi_closure_VFP_end-CNAME(ffi_closure_VFP)
#endif
ENTRY(ffi_arm_trampoline)
stmfd sp!, {r0-r3}