2012-01-11 20:36:39 +08:00
|
|
|
// Test that different values of -mfpu pick correct ARM FPU target-feature(s).
|
|
|
|
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi %s -### -o %t.o 2>&1 \
|
2012-01-11 20:36:39 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s
|
|
|
|
// CHECK-DEFAULT-NOT: "-target-feature" "+vfp2"
|
|
|
|
// CHECK-DEFAULT-NOT: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-DEFAULT-NOT: "-target-feature" "+d16"
|
|
|
|
// CHECK-DEFAULT-NOT: "-target-feature" "+neon"
|
|
|
|
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fpa %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FPA %s
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fpe2 %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FPA %s
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fpe3 %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FPA %s
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=maverick %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FPA %s
|
|
|
|
// CHECK-FPA: "-target-feature" "-vfp2"
|
|
|
|
// CHECK-FPA: "-target-feature" "-vfp3"
|
|
|
|
// CHECK-FPA: "-target-feature" "-neon"
|
|
|
|
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
|
|
|
|
// CHECK-VFP3-D16: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-VFP3-D16: "-target-feature" "+d16"
|
|
|
|
// CHECK-VFP3-D16: "-target-feature" "-neon"
|
|
|
|
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP %s
|
|
|
|
// CHECK-VFP: "-target-feature" "+vfp2"
|
|
|
|
// CHECK-VFP: "-target-feature" "-neon"
|
|
|
|
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfp3 %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s
|
|
|
|
// CHECK-VFP3: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-VFP3: "-target-feature" "-neon"
|
|
|
|
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=neon %s -### -o %t.o 2>&1 \
|
2012-01-11 19:21:31 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NEON %s
|
|
|
|
// CHECK-NEON: "-target-feature" "+neon"
|
|
|
|
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \
|
2012-01-11 20:36:39 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SOFT-FLOAT %s
|
|
|
|
// CHECK-SOFT-FLOAT: "-target-feature" "-neon"
|
2013-06-27 21:19:54 +08:00
|
|
|
|
2013-10-25 02:32:51 +08:00
|
|
|
// RUN: %clang -target armv8 -mfpu=fp-armv8 %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ARMV8-SOFT-FLOAT %s
|
|
|
|
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+fp-armv8"
|
|
|
|
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto"
|
|
|
|
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-neon"
|
|
|
|
|
2013-06-27 21:19:54 +08:00
|
|
|
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s
|
2013-10-29 17:47:51 +08:00
|
|
|
// CHECK-FP-ARMV8-NOT: "-target-feature" "+neon"
|
2013-09-13 21:48:33 +08:00
|
|
|
// CHECK-FP-ARMV8: "-target-feature" "+fp-armv8"
|
2013-10-25 02:32:51 +08:00
|
|
|
// CHECK-FP-ARMV8: "-target-feature" "-neon"
|
|
|
|
// CHECK-FP-ARMV8: "-target-feature" "-crypto"
|
2013-06-27 21:19:54 +08:00
|
|
|
|
|
|
|
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=neon-fp-armv8 %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NEON-FP-ARMV8 %s
|
2013-09-13 21:48:33 +08:00
|
|
|
// CHECK-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
|
2013-06-27 21:19:54 +08:00
|
|
|
// CHECK-NEON-FP-ARMV8: "-target-feature" "+neon"
|
2013-10-25 02:32:51 +08:00
|
|
|
// CHECK-NEON-FP-ARMV8: "-target-feature" "-crypto"
|
2013-08-20 21:19:43 +08:00
|
|
|
|
2013-09-19 21:54:03 +08:00
|
|
|
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s
|
|
|
|
// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
|
2013-10-25 02:32:51 +08:00
|
|
|
// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+neon"
|
|
|
|
// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+crypto"
|
2013-09-19 21:54:03 +08:00
|
|
|
|
2013-10-01 18:20:54 +08:00
|
|
|
// RUN: %clang -target armv8-linux-gnueabi -mfpu=none %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NO-FP %s
|
|
|
|
// CHECK-NO-FP: "-target-feature" "-vfp2"
|
|
|
|
// CHECK-NO-FP: "-target-feature" "-vfp3"
|
|
|
|
// CHECK-NO-FP: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-NO-FP: "-target-feature" "-fp-armv8"
|
|
|
|
// CHECK-NO-FP: "-target-feature" "-crypto"
|
|
|
|
// CHECK-NO-FP: "-target-feature" "-neon"
|
|
|
|
|
2013-08-20 21:19:43 +08:00
|
|
|
// RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-HF %s
|
|
|
|
// CHECK-HF: "-target-cpu" "arm1136jf-s"
|