[Builtin] Unxfail tests for armhf
authorWeiming Zhao <weimingz@codeaurora.org>
Wed, 29 Mar 2017 03:36:46 +0000 (03:36 +0000)
committerWeiming Zhao <weimingz@codeaurora.org>
Wed, 29 Mar 2017 03:36:46 +0000 (03:36 +0000)
Summary:
Originally, a few tests fail for armhf target due to:
1) COMPILER_RT_ARMHF_TARGET was not set when building the lib
2) COMPILER_RT_ABI should not be defined as `__attribute__((pcs("aapcs")))` for armhf when building for both lib and tests

This address https://bugs.llvm.org//show_bug.cgi?id=32261

mulsc3_test.c is a newly exposed issue, which will be addressed separately.

Reviewers: rengolin, compnerd

Reviewed By: compnerd

Subscribers: aemerson, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D31448

llvm-svn: 298974

26 files changed:
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/lib/builtins/int_lib.h
compiler-rt/test/builtins/CMakeLists.txt
compiler-rt/test/builtins/Unit/comparedf2_test.c
compiler-rt/test/builtins/Unit/comparesf2_test.c
compiler-rt/test/builtins/Unit/eqdf2vfp_test.c
compiler-rt/test/builtins/Unit/eqsf2vfp_test.c
compiler-rt/test/builtins/Unit/fixdfsivfp_test.c
compiler-rt/test/builtins/Unit/fixsfsivfp_test.c
compiler-rt/test/builtins/Unit/fixunssfsivfp_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/mulsc3_test.c
compiler-rt/test/builtins/Unit/nedf2vfp_test.c
compiler-rt/test/builtins/Unit/nesf2vfp_test.c
compiler-rt/test/builtins/Unit/truncdfhf2_test.c
compiler-rt/test/builtins/Unit/truncdfsf2_test.c
compiler-rt/test/builtins/Unit/truncsfhf2_test.c
compiler-rt/test/builtins/Unit/unorddf2vfp_test.c
compiler-rt/test/builtins/Unit/unordsf2vfp_test.c

index ad9059c..3f648dc 100644 (file)
@@ -499,7 +499,7 @@ else ()
       # Needed for clear_cache on debug mode, due to r7's usage in inline asm.
       # Release mode already sets it via -O2/3, Debug mode doesn't.
       if (${arch} STREQUAL "armhf")
-        list(APPEND BUILTIN_CFLAGS -fomit-frame-pointer)
+        list(APPEND BUILTIN_CFLAGS -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
       endif()
 
       add_compiler_rt_runtime(clang_rt.builtins
index 39eee18..8a202dd 100644 (file)
 #if __ARM_EABI__
 # define ARM_EABI_FNALIAS(aeabi_name, name)         \
   void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
-# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+# ifdef COMPILER_RT_ARMHF_TARGET
+#   define COMPILER_RT_ABI
+# else
+#   define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+# endif
 #else
 # define ARM_EABI_FNALIAS(aeabi_name, name)
 # define COMPILER_RT_ABI
index fa7a0f4..f37e46d 100644 (file)
@@ -19,6 +19,11 @@ foreach(arch ${BUILTIN_SUPPORTED_ARCH})
   set(BUILTINS_TEST_TARGET_ARCH ${arch})
   string(TOLOWER "-${arch}-${OS_NAME}" BUILTINS_TEST_CONFIG_SUFFIX)
   get_test_cc_for_arch(${arch} BUILTINS_TEST_TARGET_CC BUILTINS_TEST_TARGET_CFLAGS)
+  if (${arch} STREQUAL "armhf")
+    list(APPEND BUILTINS_TEST_TARGET_CFLAGS -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
+    string(REPLACE ";" " " BUILTINS_TEST_TARGET_CFLAGS "${BUILTINS_TEST_TARGET_CFLAGS}")
+  endif()
+
   string(TOUPPER ${arch} ARCH_UPPER_CASE)
   set(CONFIG_NAME ${ARCH_UPPER_CASE}${OS_NAME}Config)
   configure_lit_site_cfg(
index a7db7a4..8446901 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- cmpdf2_test.c - Test __cmpdf2 -------------------------------------===//
 //
index 9f42d97..1b5902f 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- cmpsf2_test.c - Test __cmpsf2 -------------------------------------===//
 //
index 549c37e..69dd37b 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- eqdf2vfp_test.c - Test __eqdf2vfp ---------------------------------===//
 //
index 628b0fd..9c8dc16 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- eqsf2vfp_test.c - Test __eqsf2vfp ---------------------------------===//
 //
index 3cd420a..33b4d24 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- fixdfsivfp_test.c - Test __fixdfsivfp -----------------------------===//
 //
index 0e233a5..ee33a1d 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- fixsfsivfp_test.c - Test __fixsfsivfp -----------------------------===//
 //
index f745d6f..c1d8ed7 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- fixunssfsivfp_test.c - Test __fixunssfsivfp -----------------------===//
 //
index 17cca9f..ad72083 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- gedf2vfp_test.c - Test __gedf2vfp ---------------------------------===//
 //
index 240880a..8a855e1 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- gesf2vfp_test.c - Test __gesf2vfp ---------------------------------===//
 //
index 9180ec2..e6eb545 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- gtdf2vfp_test.c - Test __gtdf2vfp ---------------------------------===//
 //
index 52e77fe..e0442c6 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- gtsf2vfp_test.c - Test __gtsf2vfp ---------------------------------===//
 //
index b248323..f0cd56e 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- ledf2vfp_test.c - Test __ledf2vfp ---------------------------------===//
 //
index c8ca590..02ae182 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- lesf2vfp_test.c - Test __lesf2vfp ---------------------------------===//
 //
index 238a6f0..1edb319 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- ltdf2vfp_test.c - Test __ltdf2vfp ---------------------------------===//
 //
index 837e0a8..2fc0c11 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- ltsf2vfp_test.c - Test __ltsf2vfp ---------------------------------===//
 //
index 4eac07e..6b38908 100644 (file)
@@ -1,4 +1,6 @@
 // RUN: %clang_builtins %s %librt -lm -o %t && %run %t
+// XFAIL: armhf-target-arch
+// See pr32261
 //===-- mulsc3_test.c - Test __mulsc3 -------------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
index 46bca5a..536917a 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- nedf2vfp_test.c - Test __nedf2vfp ---------------------------------===//
 //
index b649170..bb01490 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- nesf2vfp_test.c - Test __nesf2vfp ---------------------------------===//
 //
index 94595fc..b172811 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===--------------- truncdfhf2_test.c - Test __truncdfhf2 ----------------===//
 //
index a692ede..04bebf4 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===--------------- truncdfsf2_test.c - Test __truncdfsf2 ----------------===//
 //
index b83d8fd..2240c14 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===--------------- truncsfhf2_test.c - Test __truncsfhf2 ----------------===//
 //
index 7fe3894..21938d0 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- unorddf2vfp_test.c - Test __unorddf2vfp ---------------------------===//
 //
index 670d335..7126652 100644 (file)
@@ -1,6 +1,4 @@
 // RUN: %clang_builtins %s %librt -o %t && %run %t
-// XFAIL: armhf-target-arch
-// This test fails for armhf (see pr32261)
 
 //===-- unordsf2vfp_test.c - Test __unordsf2vfp ---------------------------===//
 //