[llvm-branch-commits] [compiler-rt] 2433348 - [builtins][ARM] Check __ARM_FP instead of __VFP_FP__.
Zhuojia Shen via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Dec 4 20:59:29 PST 2020
Author: Zhuojia Shen
Date: 2020-12-04T20:53:23-08:00
New Revision: 24333481cb23389516d47ef08e967ce833ec82a3
URL: https://github.com/llvm/llvm-project/commit/24333481cb23389516d47ef08e967ce833ec82a3
DIFF: https://github.com/llvm/llvm-project/commit/24333481cb23389516d47ef08e967ce833ec82a3.diff
LOG: [builtins][ARM] Check __ARM_FP instead of __VFP_FP__.
This patch fixes builtins' CMakeLists.txt and their VFP tests to check
the standard macro defined in the ACLE for VFP support. It also enables
the tests to be built and run for single-precision-only targets while
builtins were built with double-precision support.
Differential revision: https://reviews.llvm.org/D92497
Added:
Modified:
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/test/builtins/Unit/adddf3vfp_test.c
compiler-rt/test/builtins/Unit/addsf3vfp_test.c
compiler-rt/test/builtins/Unit/divdf3vfp_test.c
compiler-rt/test/builtins/Unit/divsf3vfp_test.c
compiler-rt/test/builtins/Unit/eqdf2vfp_test.c
compiler-rt/test/builtins/Unit/eqsf2vfp_test.c
compiler-rt/test/builtins/Unit/extendsfdf2vfp_test.c
compiler-rt/test/builtins/Unit/fixdfsivfp_test.c
compiler-rt/test/builtins/Unit/fixsfsivfp_test.c
compiler-rt/test/builtins/Unit/fixunsdfsivfp_test.c
compiler-rt/test/builtins/Unit/fixunssfsivfp_test.c
compiler-rt/test/builtins/Unit/floatsidfvfp_test.c
compiler-rt/test/builtins/Unit/floatsisfvfp_test.c
compiler-rt/test/builtins/Unit/floatunssidfvfp_test.c
compiler-rt/test/builtins/Unit/floatunssisfvfp_test.c
compiler-rt/test/builtins/Unit/gedf2vfp_test.c
compiler-rt/test/builtins/Unit/gesf2vfp_test.c
compiler-rt/test/builtins/Unit/gtdf2vfp_test.c
compiler-rt/test/builtins/Unit/gtsf2vfp_test.c
compiler-rt/test/builtins/Unit/ledf2vfp_test.c
compiler-rt/test/builtins/Unit/lesf2vfp_test.c
compiler-rt/test/builtins/Unit/ltdf2vfp_test.c
compiler-rt/test/builtins/Unit/ltsf2vfp_test.c
compiler-rt/test/builtins/Unit/muldf3vfp_test.c
compiler-rt/test/builtins/Unit/mulsf3vfp_test.c
compiler-rt/test/builtins/Unit/nedf2vfp_test.c
compiler-rt/test/builtins/Unit/negdf2vfp_test.c
compiler-rt/test/builtins/Unit/negsf2vfp_test.c
compiler-rt/test/builtins/Unit/nesf2vfp_test.c
compiler-rt/test/builtins/Unit/subdf3vfp_test.c
compiler-rt/test/builtins/Unit/subsf3vfp_test.c
compiler-rt/test/builtins/Unit/truncdfsf2vfp_test.c
compiler-rt/test/builtins/Unit/unorddf2vfp_test.c
compiler-rt/test/builtins/Unit/unordsf2vfp_test.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index f7a9b233d7c7..99cdeac13a66 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -688,7 +688,7 @@ else ()
# For ARM archs, exclude any VFP builtins if VFP is not supported
if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
- check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
+ check_compile_definition(__ARM_FP "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
if(NOT COMPILER_RT_HAS_${arch}_VFP)
list(REMOVE_ITEM ${arch}_SOURCES ${arm_Thumb1_VFPv2_DP_SOURCES} ${arm_Thumb1_VFPv2_SP_SOURCES} ${arm_Thumb1_SjLj_EH_SOURCES})
else()
diff --git a/compiler-rt/test/builtins/Unit/adddf3vfp_test.c b/compiler-rt/test/builtins/Unit/adddf3vfp_test.c
index f2f91d4404ca..76283658824c 100644
--- a/compiler-rt/test/builtins/Unit/adddf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/adddf3vfp_test.c
@@ -7,7 +7,7 @@
#include <math.h>
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
extern COMPILER_RT_ABI double __adddf3vfp(double a, double b);
int test__adddf3vfp(double a, double b)
@@ -23,7 +23,7 @@ int test__adddf3vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__adddf3vfp(1.0, 1.0))
return 1;
if (test__adddf3vfp(HUGE_VAL, HUGE_VAL))
diff --git a/compiler-rt/test/builtins/Unit/addsf3vfp_test.c b/compiler-rt/test/builtins/Unit/addsf3vfp_test.c
index 2bdf1aff5e63..d666fbf9c7f4 100644
--- a/compiler-rt/test/builtins/Unit/addsf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/addsf3vfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI float __addsf3vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__addsf3vfp(float a, float b)
{
float actual = __addsf3vfp(a, b);
@@ -23,7 +23,7 @@ int test__addsf3vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__addsf3vfp(1.0, 1.0))
return 1;
if (test__addsf3vfp(HUGE_VALF, HUGE_VALF))
diff --git a/compiler-rt/test/builtins/Unit/divdf3vfp_test.c b/compiler-rt/test/builtins/Unit/divdf3vfp_test.c
index 256b5b64a842..ceed16de0470 100644
--- a/compiler-rt/test/builtins/Unit/divdf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/divdf3vfp_test.c
@@ -7,7 +7,7 @@
#include <math.h>
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
extern COMPILER_RT_ABI double __divdf3vfp(double a, double b);
int test__divdf3vfp(double a, double b)
@@ -23,7 +23,7 @@ int test__divdf3vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__divdf3vfp(1.0, 1.0))
return 1;
if (test__divdf3vfp(12345.678, 1.23))
diff --git a/compiler-rt/test/builtins/Unit/divsf3vfp_test.c b/compiler-rt/test/builtins/Unit/divsf3vfp_test.c
index 14a4861763e4..3f177b993d3c 100644
--- a/compiler-rt/test/builtins/Unit/divsf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/divsf3vfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI float __divsf3vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__divsf3vfp(float a, float b)
{
float actual = __divsf3vfp(a, b);
@@ -23,7 +23,7 @@ int test__divsf3vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__divsf3vfp(1.0, 1.0))
return 1;
if (test__divsf3vfp(12345.678, 1.23))
diff --git a/compiler-rt/test/builtins/Unit/eqdf2vfp_test.c b/compiler-rt/test/builtins/Unit/eqdf2vfp_test.c
index d4a75bb12c7b..bc3385552590 100644
--- a/compiler-rt/test/builtins/Unit/eqdf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/eqdf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __eqdf2vfp(double a, double b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__eqdf2vfp(double a, double b)
{
int actual = __eqdf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__eqdf2vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__eqdf2vfp(0.0, 0.0))
return 1;
if (test__eqdf2vfp(1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/eqsf2vfp_test.c b/compiler-rt/test/builtins/Unit/eqsf2vfp_test.c
index 58f255071d3f..023f7e6c70cf 100644
--- a/compiler-rt/test/builtins/Unit/eqsf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/eqsf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __eqsf2vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__eqsf2vfp(float a, float b)
{
int actual = __eqsf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__eqsf2vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__eqsf2vfp(0.0, 0.0))
return 1;
if (test__eqsf2vfp(1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/extendsfdf2vfp_test.c b/compiler-rt/test/builtins/Unit/extendsfdf2vfp_test.c
index 949d52093d9b..123064519b91 100644
--- a/compiler-rt/test/builtins/Unit/extendsfdf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/extendsfdf2vfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI double __extendsfdf2vfp(float a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__extendsfdf2vfp(float a)
{
double actual = __extendsfdf2vfp(a);
@@ -23,7 +23,7 @@ int test__extendsfdf2vfp(float a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__extendsfdf2vfp(0.0))
return 1;
if (test__extendsfdf2vfp(1.0))
diff --git a/compiler-rt/test/builtins/Unit/fixdfsivfp_test.c b/compiler-rt/test/builtins/Unit/fixdfsivfp_test.c
index 9912ee8c8311..7ffe449b8d76 100644
--- a/compiler-rt/test/builtins/Unit/fixdfsivfp_test.c
+++ b/compiler-rt/test/builtins/Unit/fixdfsivfp_test.c
@@ -8,7 +8,7 @@
extern int __fixdfsivfp(double a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__fixdfsivfp(double a)
{
int actual = __fixdfsivfp(a);
@@ -22,7 +22,7 @@ int test__fixdfsivfp(double a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__fixdfsivfp(0.0))
return 1;
if (test__fixdfsivfp(1.0))
diff --git a/compiler-rt/test/builtins/Unit/fixsfsivfp_test.c b/compiler-rt/test/builtins/Unit/fixsfsivfp_test.c
index dd4fcd02dfaa..63666c7cb258 100644
--- a/compiler-rt/test/builtins/Unit/fixsfsivfp_test.c
+++ b/compiler-rt/test/builtins/Unit/fixsfsivfp_test.c
@@ -8,7 +8,7 @@
extern int __fixsfsivfp(float a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__fixsfsivfp(float a)
{
int actual = __fixsfsivfp(a);
@@ -22,7 +22,7 @@ int test__fixsfsivfp(float a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__fixsfsivfp(0.0))
return 1;
if (test__fixsfsivfp(1.0))
diff --git a/compiler-rt/test/builtins/Unit/fixunsdfsivfp_test.c b/compiler-rt/test/builtins/Unit/fixunsdfsivfp_test.c
index b95865a26364..155650d4f3fd 100644
--- a/compiler-rt/test/builtins/Unit/fixunsdfsivfp_test.c
+++ b/compiler-rt/test/builtins/Unit/fixunsdfsivfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI unsigned int __fixunsdfsivfp(double a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__fixunsdfsivfp(double a)
{
unsigned int actual = __fixunsdfsivfp(a);
@@ -23,7 +23,7 @@ int test__fixunsdfsivfp(double a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__fixunsdfsivfp(0.0))
return 1;
if (test__fixunsdfsivfp(1.0))
diff --git a/compiler-rt/test/builtins/Unit/fixunssfsivfp_test.c b/compiler-rt/test/builtins/Unit/fixunssfsivfp_test.c
index ba8e95258997..1ddcbb0e5450 100644
--- a/compiler-rt/test/builtins/Unit/fixunssfsivfp_test.c
+++ b/compiler-rt/test/builtins/Unit/fixunssfsivfp_test.c
@@ -8,7 +8,7 @@
extern unsigned int __fixunssfsivfp(float a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__fixunssfsivfp(float a)
{
unsigned int actual = __fixunssfsivfp(a);
@@ -22,7 +22,7 @@ int test__fixunssfsivfp(float a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__fixunssfsivfp(0.0))
return 1;
if (test__fixunssfsivfp(1.0))
diff --git a/compiler-rt/test/builtins/Unit/floatsidfvfp_test.c b/compiler-rt/test/builtins/Unit/floatsidfvfp_test.c
index db2b8100c1af..c7d9c2ee0195 100644
--- a/compiler-rt/test/builtins/Unit/floatsidfvfp_test.c
+++ b/compiler-rt/test/builtins/Unit/floatsidfvfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI double __floatsidfvfp(int a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__floatsidfvfp(int a)
{
double actual = __floatsidfvfp(a);
@@ -23,7 +23,7 @@ int test__floatsidfvfp(int a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__floatsidfvfp(0))
return 1;
if (test__floatsidfvfp(1))
diff --git a/compiler-rt/test/builtins/Unit/floatsisfvfp_test.c b/compiler-rt/test/builtins/Unit/floatsisfvfp_test.c
index 992068d8c575..63153fefb8c7 100644
--- a/compiler-rt/test/builtins/Unit/floatsisfvfp_test.c
+++ b/compiler-rt/test/builtins/Unit/floatsisfvfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI float __floatsisfvfp(int a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__floatsisfvfp(int a)
{
float actual = __floatsisfvfp(a);
@@ -23,7 +23,7 @@ int test__floatsisfvfp(int a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__floatsisfvfp(0))
return 1;
if (test__floatsisfvfp(1))
diff --git a/compiler-rt/test/builtins/Unit/floatunssidfvfp_test.c b/compiler-rt/test/builtins/Unit/floatunssidfvfp_test.c
index 8a35dc932a35..f093d60c8389 100644
--- a/compiler-rt/test/builtins/Unit/floatunssidfvfp_test.c
+++ b/compiler-rt/test/builtins/Unit/floatunssidfvfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI double __floatunssidfvfp(unsigned int a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__floatunssidfvfp(unsigned int a)
{
double actual = __floatunssidfvfp(a);
@@ -23,7 +23,7 @@ int test__floatunssidfvfp(unsigned int a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__floatunssidfvfp(0))
return 1;
if (test__floatunssidfvfp(1))
diff --git a/compiler-rt/test/builtins/Unit/floatunssisfvfp_test.c b/compiler-rt/test/builtins/Unit/floatunssisfvfp_test.c
index f965637836aa..06b4a32bec13 100644
--- a/compiler-rt/test/builtins/Unit/floatunssisfvfp_test.c
+++ b/compiler-rt/test/builtins/Unit/floatunssisfvfp_test.c
@@ -8,7 +8,7 @@
extern COMPILER_RT_ABI float __floatunssisfvfp(unsigned int a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__floatunssisfvfp(unsigned int a)
{
float actual = __floatunssisfvfp(a);
@@ -22,7 +22,7 @@ int test__floatunssisfvfp(unsigned int a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__floatunssisfvfp(0))
return 1;
if (test__floatunssisfvfp(1))
diff --git a/compiler-rt/test/builtins/Unit/gedf2vfp_test.c b/compiler-rt/test/builtins/Unit/gedf2vfp_test.c
index 6ab9c52cfe7b..b75fb10f0908 100644
--- a/compiler-rt/test/builtins/Unit/gedf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/gedf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __gedf2vfp(double a, double b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__gedf2vfp(double a, double b)
{
int actual = __gedf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__gedf2vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__gedf2vfp(0.0, 0.0))
return 1;
if (test__gedf2vfp(1.0, 0.0))
diff --git a/compiler-rt/test/builtins/Unit/gesf2vfp_test.c b/compiler-rt/test/builtins/Unit/gesf2vfp_test.c
index 46f196fe0f8e..528e4137104f 100644
--- a/compiler-rt/test/builtins/Unit/gesf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/gesf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __gesf2vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__gesf2vfp(float a, float b)
{
int actual = __gesf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__gesf2vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__gesf2vfp(0.0, 0.0))
return 1;
if (test__gesf2vfp(1.1, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/gtdf2vfp_test.c b/compiler-rt/test/builtins/Unit/gtdf2vfp_test.c
index deb3ca1139c0..e9403234892b 100644
--- a/compiler-rt/test/builtins/Unit/gtdf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/gtdf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __gtdf2vfp(double a, double b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__gtdf2vfp(double a, double b)
{
int actual = __gtdf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__gtdf2vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__gtdf2vfp(0.0, 0.0))
return 1;
if (test__gtdf2vfp(1.0, 0.0))
diff --git a/compiler-rt/test/builtins/Unit/gtsf2vfp_test.c b/compiler-rt/test/builtins/Unit/gtsf2vfp_test.c
index 66082699343e..8958baf1192c 100644
--- a/compiler-rt/test/builtins/Unit/gtsf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/gtsf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __gtsf2vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__gtsf2vfp(float a, float b)
{
int actual = __gtsf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__gtsf2vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__gtsf2vfp(0.0, 0.0))
return 1;
if (test__gtsf2vfp(1.0, 0.0))
diff --git a/compiler-rt/test/builtins/Unit/ledf2vfp_test.c b/compiler-rt/test/builtins/Unit/ledf2vfp_test.c
index 25ab345720c2..f098ff507cdf 100644
--- a/compiler-rt/test/builtins/Unit/ledf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/ledf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __ledf2vfp(double a, double b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__ledf2vfp(double a, double b)
{
int actual = __ledf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__ledf2vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__ledf2vfp(0.0, 0.0))
return 1;
if (test__ledf2vfp(1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/lesf2vfp_test.c b/compiler-rt/test/builtins/Unit/lesf2vfp_test.c
index df5ebae28134..f1635a72dae3 100644
--- a/compiler-rt/test/builtins/Unit/lesf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/lesf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __lesf2vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__lesf2vfp(float a, float b)
{
int actual = __lesf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__lesf2vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__lesf2vfp(0.0, 0.0))
return 1;
if (test__lesf2vfp(1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/ltdf2vfp_test.c b/compiler-rt/test/builtins/Unit/ltdf2vfp_test.c
index 98fa57abc9f5..23234a40c5da 100644
--- a/compiler-rt/test/builtins/Unit/ltdf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/ltdf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __ltdf2vfp(double a, double b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__ltdf2vfp(double a, double b)
{
int actual = __ltdf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__ltdf2vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__ltdf2vfp(0.0, 0.0))
return 1;
if (test__ltdf2vfp(1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/ltsf2vfp_test.c b/compiler-rt/test/builtins/Unit/ltsf2vfp_test.c
index 2b31d1f18167..0aadf5acfc2f 100644
--- a/compiler-rt/test/builtins/Unit/ltsf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/ltsf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __ltsf2vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__ltsf2vfp(float a, float b)
{
int actual = __ltsf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__ltsf2vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__ltsf2vfp(0.0, 0.0))
return 1;
if (test__ltsf2vfp(-1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/muldf3vfp_test.c b/compiler-rt/test/builtins/Unit/muldf3vfp_test.c
index 9637e41c1dec..ba84a1cd3e82 100644
--- a/compiler-rt/test/builtins/Unit/muldf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/muldf3vfp_test.c
@@ -7,7 +7,7 @@
#include <math.h>
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
extern COMPILER_RT_ABI double __muldf3vfp(double a, double b);
int test__muldf3vfp(double a, double b)
@@ -23,7 +23,7 @@ int test__muldf3vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__muldf3vfp(0.5, 10.0))
return 1;
if (test__muldf3vfp(-0.5, -2.0))
diff --git a/compiler-rt/test/builtins/Unit/mulsf3vfp_test.c b/compiler-rt/test/builtins/Unit/mulsf3vfp_test.c
index d1a41e002e97..77af9a2b9ba2 100644
--- a/compiler-rt/test/builtins/Unit/mulsf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/mulsf3vfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI float __mulsf3vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__mulsf3vfp(float a, float b)
{
float actual = __mulsf3vfp(a, b);
@@ -23,7 +23,7 @@ int test__mulsf3vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__mulsf3vfp(0.5, 10.0))
return 1;
if (test__mulsf3vfp(-0.5, -2.0))
diff --git a/compiler-rt/test/builtins/Unit/nedf2vfp_test.c b/compiler-rt/test/builtins/Unit/nedf2vfp_test.c
index 99e81a7f4c21..7a1474f4cf16 100644
--- a/compiler-rt/test/builtins/Unit/nedf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/nedf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __nedf2vfp(double a, double b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__nedf2vfp(double a, double b)
{
int actual = __nedf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__nedf2vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__nedf2vfp(0.0, 0.0))
return 1;
if (test__nedf2vfp(1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/negdf2vfp_test.c b/compiler-rt/test/builtins/Unit/negdf2vfp_test.c
index 0681b9aecd2a..834413165b88 100644
--- a/compiler-rt/test/builtins/Unit/negdf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/negdf2vfp_test.c
@@ -7,7 +7,7 @@
#include <math.h>
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
extern COMPILER_RT_ABI double __negdf2vfp(double a);
int test__negdf2vfp(double a)
@@ -23,7 +23,7 @@ int test__negdf2vfp(double a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__negdf2vfp(1.0))
return 1;
if (test__negdf2vfp(HUGE_VALF))
diff --git a/compiler-rt/test/builtins/Unit/negsf2vfp_test.c b/compiler-rt/test/builtins/Unit/negsf2vfp_test.c
index c1ebb1cd05c6..474b004cd377 100644
--- a/compiler-rt/test/builtins/Unit/negsf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/negsf2vfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI float __negsf2vfp(float a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__negsf2vfp(float a)
{
float actual = __negsf2vfp(a);
@@ -23,7 +23,7 @@ int test__negsf2vfp(float a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__negsf2vfp(1.0))
return 1;
if (test__negsf2vfp(HUGE_VALF))
diff --git a/compiler-rt/test/builtins/Unit/nesf2vfp_test.c b/compiler-rt/test/builtins/Unit/nesf2vfp_test.c
index c94e067c45d7..48c50689134e 100644
--- a/compiler-rt/test/builtins/Unit/nesf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/nesf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __nesf2vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__nesf2vfp(float a, float b)
{
int actual = __nesf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__nesf2vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__nesf2vfp(0.0, 0.0))
return 1;
if (test__nesf2vfp(1.0, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/subdf3vfp_test.c b/compiler-rt/test/builtins/Unit/subdf3vfp_test.c
index baff77c09fdf..7fcd3af20e87 100644
--- a/compiler-rt/test/builtins/Unit/subdf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/subdf3vfp_test.c
@@ -7,7 +7,7 @@
#include <math.h>
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
extern COMPILER_RT_ABI double __subdf3vfp(double a, double b);
int test__subdf3vfp(double a, double b)
@@ -23,7 +23,7 @@ int test__subdf3vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__subdf3vfp(1.0, 1.0))
return 1;
if (test__subdf3vfp(1234.567, 765.4321))
diff --git a/compiler-rt/test/builtins/Unit/subsf3vfp_test.c b/compiler-rt/test/builtins/Unit/subsf3vfp_test.c
index d8617ad70442..46cfeec470e9 100644
--- a/compiler-rt/test/builtins/Unit/subsf3vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/subsf3vfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI float __subsf3vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__subsf3vfp(float a, float b)
{
float actual = __subsf3vfp(a, b);
@@ -23,7 +23,7 @@ int test__subsf3vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__subsf3vfp(1.0, 1.0))
return 1;
if (test__subsf3vfp(1234.567, 765.4321))
diff --git a/compiler-rt/test/builtins/Unit/truncdfsf2vfp_test.c b/compiler-rt/test/builtins/Unit/truncdfsf2vfp_test.c
index d5d2283c374b..dc1924c8c001 100644
--- a/compiler-rt/test/builtins/Unit/truncdfsf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/truncdfsf2vfp_test.c
@@ -9,7 +9,7 @@
extern COMPILER_RT_ABI float __truncdfsf2vfp(double a);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__truncdfsf2vfp(double a)
{
float actual = __truncdfsf2vfp(a);
@@ -23,7 +23,7 @@ int test__truncdfsf2vfp(double a)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__truncdfsf2vfp(0.0))
return 1;
if (test__truncdfsf2vfp(1.0))
diff --git a/compiler-rt/test/builtins/Unit/unorddf2vfp_test.c b/compiler-rt/test/builtins/Unit/unorddf2vfp_test.c
index d5b68fcc743c..94f9985c731a 100644
--- a/compiler-rt/test/builtins/Unit/unorddf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/unorddf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __unorddf2vfp(double a, double b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
int test__unorddf2vfp(double a, double b)
{
int actual = __unorddf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__unorddf2vfp(double a, double b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x8)
if (test__unorddf2vfp(0.0, NAN))
return 1;
if (test__unorddf2vfp(NAN, 1.0))
diff --git a/compiler-rt/test/builtins/Unit/unordsf2vfp_test.c b/compiler-rt/test/builtins/Unit/unordsf2vfp_test.c
index 2803754bb66d..a829b4c1bbcb 100644
--- a/compiler-rt/test/builtins/Unit/unordsf2vfp_test.c
+++ b/compiler-rt/test/builtins/Unit/unordsf2vfp_test.c
@@ -9,7 +9,7 @@
extern int __unordsf2vfp(float a, float b);
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
int test__unordsf2vfp(float a, float b)
{
int actual = __unordsf2vfp(a, b);
@@ -23,7 +23,7 @@ int test__unordsf2vfp(float a, float b)
int main()
{
-#if __arm__ && __VFP_FP__
+#if defined(__arm__) && defined(__ARM_FP) && (__ARM_FP & 0x4)
if (test__unordsf2vfp(0.0, NAN))
return 1;
if (test__unordsf2vfp(NAN, 1.0))
More information about the llvm-branch-commits
mailing list