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
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-FPA: error: {{.*}} does not support '-mfpu={{fpa|fpe|fpe2|fpe3|maverick}}'
|
2012-01-11 19:21:31 +08:00
|
|
|
|
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"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-VFP: "-target-feature" "-vfp3"
|
|
|
|
// CHECK-VFP: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-VFP: "-target-feature" "-fp-armv8"
|
2012-01-11 19:21:31 +08:00
|
|
|
// 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"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-VFP3: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-VFP3: "-target-feature" "-fp-armv8"
|
2012-01-11 19:21:31 +08:00
|
|
|
// CHECK-VFP3: "-target-feature" "-neon"
|
|
|
|
|
2015-06-29 17:30:19 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3-FP16 %s
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "-fp-only-sp"
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "-d16"
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "+fp16"
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "-fp-armv8"
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "-neon"
|
|
|
|
// CHECK-VFP3-FP16: "-target-feature" "-crypto"
|
|
|
|
|
2014-11-29 04:39:54 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-VFP3-D16: "-target-feature" "-fp-only-sp"
|
2014-11-29 04:39:54 +08:00
|
|
|
// CHECK-VFP3-D16: "-target-feature" "+d16"
|
2015-05-09 05:04:50 +08:00
|
|
|
// CHECK-VFP3-D16: "-target-feature" "+vfp3"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-VFP3-D16: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-VFP3-D16: "-target-feature" "-fp-armv8"
|
2014-11-29 04:39:54 +08:00
|
|
|
// CHECK-VFP3-D16: "-target-feature" "-neon"
|
|
|
|
|
2015-06-29 17:30:19 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16-FP16 %s
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "-fp-only-sp"
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "+d16"
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "+fp16"
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "-fp-armv8"
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "-neon"
|
|
|
|
// CHECK-VFP3-D16-FP16: "-target-feature" "-crypto"
|
|
|
|
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3XD %s
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "+fp-only-sp"
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "+d16"
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "-fp16"
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "-fp-armv8"
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "-neon"
|
|
|
|
// CHECK-VFP3XD: "-target-feature" "-crypto"
|
|
|
|
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP3XD-FP16 %s
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "+fp-only-sp"
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "+d16"
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "+fp16"
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "-fp-armv8"
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "-neon"
|
|
|
|
// CHECK-VFP3XD-FP16: "-target-feature" "-crypto"
|
|
|
|
|
2013-11-21 22:04:38 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
|
|
|
|
// CHECK-VFP4: "-target-feature" "+vfp4"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-VFP4: "-target-feature" "-fp-armv8"
|
2013-11-21 22:04:38 +08:00
|
|
|
// CHECK-VFP4: "-target-feature" "-neon"
|
|
|
|
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfp4-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-VFP4-D16: "-target-feature" "-fp-only-sp"
|
2013-11-21 22:04:38 +08:00
|
|
|
// CHECK-VFP4-D16: "-target-feature" "+d16"
|
2015-05-09 05:04:50 +08:00
|
|
|
// CHECK-VFP4-D16: "-target-feature" "+vfp4"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-VFP4-D16: "-target-feature" "-fp-armv8"
|
2013-11-21 22:04:38 +08:00
|
|
|
// CHECK-VFP4-D16: "-target-feature" "-neon"
|
|
|
|
|
2014-02-21 18:39:15 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fp4-sp-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s
|
|
|
|
// CHECK-FP4-SP-D16: "-target-feature" "+fp-only-sp"
|
2015-05-09 05:04:50 +08:00
|
|
|
// CHECK-FP4-SP-D16: "-target-feature" "+d16"
|
|
|
|
// CHECK-FP4-SP-D16: "-target-feature" "+vfp4"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-FP4-SP-D16: "-target-feature" "-fp-armv8"
|
2014-02-21 18:39:15 +08:00
|
|
|
// CHECK-FP4-SP-D16: "-target-feature" "-neon"
|
2013-11-21 22:04:38 +08:00
|
|
|
|
2014-10-01 17:03:02 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fp5-sp-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fpv5-sp-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s
|
|
|
|
// CHECK-FP5-SP-D16: "-target-feature" "+fp-only-sp"
|
|
|
|
// CHECK-FP5-SP-D16: "-target-feature" "+d16"
|
2015-05-09 05:04:50 +08:00
|
|
|
// CHECK-FP5-SP-D16: "-target-feature" "+fp-armv8"
|
2014-10-01 17:03:02 +08:00
|
|
|
// CHECK-FP5-SP-D16: "-target-feature" "-neon"
|
|
|
|
// CHECK-FP5-SP-D16: "-target-feature" "-crypto"
|
|
|
|
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fp5-dp-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s
|
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-FP5-DP-D16: "-target-feature" "-fp-only-sp"
|
2014-10-01 17:03:02 +08:00
|
|
|
// CHECK-FP5-DP-D16: "-target-feature" "+d16"
|
2015-05-09 05:04:50 +08:00
|
|
|
// CHECK-FP5-DP-D16: "-target-feature" "+fp-armv8"
|
2014-10-01 17:03:02 +08:00
|
|
|
// CHECK-FP5-DP-D16: "-target-feature" "-neon"
|
|
|
|
// CHECK-FP5-DP-D16: "-target-feature" "-crypto"
|
|
|
|
|
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"
|
|
|
|
|
2015-06-29 17:30:19 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NEON-FP16 %s
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "-fp-only-sp"
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "-d16"
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "+vfp3"
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "+fp16"
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "-vfp4"
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "-fp-armv8"
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "+neon"
|
|
|
|
// CHECK-NEON-FP16: "-target-feature" "-crypto"
|
|
|
|
|
2014-11-29 04:39:59 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV3 %s
|
|
|
|
// CHECK-NEON-VFPV3: "-target-feature" "+neon"
|
|
|
|
|
2014-11-29 04:39:54 +08:00
|
|
|
// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV4 %s
|
2014-12-19 00:31:18 +08:00
|
|
|
// CHECK-NEON-VFPV4: "-target-feature" "+vfp4"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-NEON-VFPV4: "-target-feature" "+neon"
|
2014-11-29 04:39:54 +08:00
|
|
|
|
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
|
|
|
|
2014-02-12 18:22:35 +08:00
|
|
|
// RUN: %clang -target armv8 %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ARMV8-DEFAULT-SOFT-FP %s
|
|
|
|
// CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-neon"
|
|
|
|
// CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-crypto"
|
|
|
|
|
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" "-neon"
|
2014-02-12 18:22:35 +08:00
|
|
|
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto"
|
2013-10-25 02:32:51 +08:00
|
|
|
|
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" "+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
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-NO-FP: "-target-feature" "-fp-only-sp"
|
|
|
|
// CHECK-NO-FP: "-target-feature" "-d16"
|
2013-10-01 18:20:54 +08:00
|
|
|
// 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"
|
2014-10-03 17:11:41 +08:00
|
|
|
// CHECK-NO-FP: "-target-feature" "-neon"
|
2015-06-05 21:34:11 +08:00
|
|
|
// CHECK-NO-FP: "-target-feature" "-crypto"
|
2013-10-01 18:20:54 +08:00
|
|
|
|
2013-08-20 21:19:43 +08:00
|
|
|
// RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-HF %s
|
2015-03-17 19:55:43 +08:00
|
|
|
// CHECK-HF: "-target-cpu" "arm1176jzf-s"
|
2013-11-23 22:36:40 +08:00
|
|
|
|
|
|
|
// RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=ASM %s
|
|
|
|
// ASM-NOT: -target-feature
|