From ed97dfd979c054b8c598875410529077dad84c02 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 18 Feb 2016 23:53:03 +0000 Subject: improve macro logic for enabling arm math asm in order to take advantage of the fpu in -mfloat-abi=softfp mode, the __VFP_FP__ (presence of vfp fpu) was checked instead of checking for __ARM_PCS_VFP (hardfloat EABI variant). however, the latter macro is the one that's actually specified by the ABI documents rather than being compiler-specific, and should also be checked in case __VFP_FP__ is not defined on some compilers or some configurations. --- src/math/arm/sqrt.c | 2 +- src/math/arm/sqrtf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/math/arm/sqrt.c b/src/math/arm/sqrt.c index c9c00083..874af960 100644 --- a/src/math/arm/sqrt.c +++ b/src/math/arm/sqrt.c @@ -1,6 +1,6 @@ #include -#if __VFP_FP__ && !__SOFTFP__ +#if __ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__) double sqrt(double x) { diff --git a/src/math/arm/sqrtf.c b/src/math/arm/sqrtf.c index e6576655..98858ecd 100644 --- a/src/math/arm/sqrtf.c +++ b/src/math/arm/sqrtf.c @@ -1,6 +1,6 @@ #include -#if __VFP_FP__ && !__SOFTFP__ +#if __ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__) float sqrtf(float x) { -- cgit v1.2.1