Evgeniy Stepanov | a745155 | 2012-01-11 12:36:39 +0000 | [diff] [blame] | 1 | // Test that different values of -mfpu pick correct ARM FPU target-feature(s). |
| 2 | |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 3 | // RUN: %clang -target arm-linux-eabi %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | a745155 | 2012-01-11 12:36:39 +0000 | [diff] [blame] | 4 | // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s |
| 5 | // CHECK-DEFAULT-NOT: "-target-feature" "+vfp2" |
| 6 | // CHECK-DEFAULT-NOT: "-target-feature" "+vfp3" |
| 7 | // CHECK-DEFAULT-NOT: "-target-feature" "+d16" |
| 8 | // CHECK-DEFAULT-NOT: "-target-feature" "+neon" |
| 9 | |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 10 | // RUN: %clang -target arm-linux-eabi -mfpu=fpa %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 11 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 12 | // RUN: %clang -target arm-linux-eabi -mfpu=fpe2 %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 13 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 14 | // RUN: %clang -target arm-linux-eabi -mfpu=fpe3 %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 15 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 16 | // RUN: %clang -target arm-linux-eabi -mfpu=maverick %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 17 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
| 18 | // CHECK-FPA: "-target-feature" "-vfp2" |
| 19 | // CHECK-FPA: "-target-feature" "-vfp3" |
| 20 | // CHECK-FPA: "-target-feature" "-neon" |
| 21 | |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 22 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 23 | // RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 24 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 25 | // RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s |
| 26 | // CHECK-VFP3-D16: "-target-feature" "+vfp3" |
| 27 | // CHECK-VFP3-D16: "-target-feature" "+d16" |
| 28 | // CHECK-VFP3-D16: "-target-feature" "-neon" |
| 29 | |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 30 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 31 | // RUN: | FileCheck --check-prefix=CHECK-VFP %s |
| 32 | // CHECK-VFP: "-target-feature" "+vfp2" |
| 33 | // CHECK-VFP: "-target-feature" "-neon" |
| 34 | |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 35 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp3 %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 36 | // RUN: | FileCheck --check-prefix=CHECK-VFP3 %s |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 37 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 38 | // RUN: | FileCheck --check-prefix=CHECK-VFP3 %s |
| 39 | // CHECK-VFP3: "-target-feature" "+vfp3" |
| 40 | // CHECK-VFP3: "-target-feature" "-neon" |
| 41 | |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 42 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \ |
| 43 | // RUN: | FileCheck --check-prefix=CHECK-VFP4 %s |
| 44 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \ |
| 45 | // RUN: | FileCheck --check-prefix=CHECK-VFP4 %s |
| 46 | // CHECK-VFP4: "-target-feature" "+vfp4" |
| 47 | // CHECK-VFP4: "-target-feature" "-neon" |
| 48 | |
| 49 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp4-d16 %s -### -o %t.o 2>&1 \ |
| 50 | // RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s |
| 51 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 %s -### -o %t.o 2>&1 \ |
| 52 | // RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s |
| 53 | // CHECK-VFP4-D16: "-target-feature" "+vfp4" |
| 54 | // CHECK-VFP4-D16: "-target-feature" "+d16" |
| 55 | // CHECK-VFP4-D16: "-target-feature" "-neon" |
| 56 | |
Oliver Stannard | 96601ca | 2014-02-21 10:39:15 +0000 | [diff] [blame] | 57 | // RUN: %clang -target arm-linux-eabi -mfpu=fp4-sp-d16 %s -### -o %t.o 2>&1 \ |
| 58 | // RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s |
| 59 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 %s -### -o %t.o 2>&1 \ |
| 60 | // RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s |
| 61 | // CHECK-FP4-SP-D16: "-target-feature" "+vfp4" |
| 62 | // CHECK-FP4-SP-D16: "-target-feature" "+d16" |
| 63 | // CHECK-FP4-SP-D16: "-target-feature" "+fp-only-sp" |
| 64 | // CHECK-FP4-SP-D16: "-target-feature" "-neon" |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 65 | |
Oliver Stannard | bfd3ea3 | 2014-10-01 09:03:02 +0000 | [diff] [blame] | 66 | // RUN: %clang -target arm-linux-eabi -mfpu=fp5-sp-d16 %s -### -o %t.o 2>&1 \ |
| 67 | // RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s |
| 68 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv5-sp-d16 %s -### -o %t.o 2>&1 \ |
| 69 | // RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s |
| 70 | // CHECK-FP5-SP-D16: "-target-feature" "+fp-armv8" |
| 71 | // CHECK-FP5-SP-D16: "-target-feature" "+fp-only-sp" |
| 72 | // CHECK-FP5-SP-D16: "-target-feature" "+d16" |
| 73 | // CHECK-FP5-SP-D16: "-target-feature" "-neon" |
| 74 | // CHECK-FP5-SP-D16: "-target-feature" "-crypto" |
| 75 | |
| 76 | // RUN: %clang -target arm-linux-eabi -mfpu=fp5-dp-d16 %s -### -o %t.o 2>&1 \ |
| 77 | // RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s |
| 78 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -### -o %t.o 2>&1 \ |
| 79 | // RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s |
| 80 | // CHECK-FP5-DP-D16: "-target-feature" "+fp-armv8" |
| 81 | // CHECK-FP5-DP-D16: "-target-feature" "+d16" |
| 82 | // CHECK-FP5-DP-D16: "-target-feature" "-neon" |
| 83 | // CHECK-FP5-DP-D16: "-target-feature" "-crypto" |
| 84 | |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 85 | // RUN: %clang -target arm-linux-eabi -mfpu=neon %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | 48af2a9 | 2012-01-11 11:21:31 +0000 | [diff] [blame] | 86 | // RUN: | FileCheck --check-prefix=CHECK-NEON %s |
| 87 | // CHECK-NEON: "-target-feature" "+neon" |
| 88 | |
Sebastian Pop | 422377c | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 89 | // RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \ |
Evgeniy Stepanov | a745155 | 2012-01-11 12:36:39 +0000 | [diff] [blame] | 90 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-FLOAT %s |
| 91 | // CHECK-SOFT-FLOAT: "-target-feature" "-neon" |
Joey Gouly | 7db275b | 2013-06-27 13:19:54 +0000 | [diff] [blame] | 92 | |
Amara Emerson | ecbe18e | 2014-02-12 10:22:35 +0000 | [diff] [blame] | 93 | // RUN: %clang -target armv8 %s -### 2>&1 \ |
| 94 | // RUN: | FileCheck --check-prefix=CHECK-ARMV8-DEFAULT-SOFT-FP %s |
| 95 | // CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-neon" |
| 96 | // CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-crypto" |
| 97 | |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 98 | // RUN: %clang -target armv8 -mfpu=fp-armv8 %s -### 2>&1 \ |
| 99 | // RUN: | FileCheck --check-prefix=CHECK-ARMV8-SOFT-FLOAT %s |
| 100 | // CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+fp-armv8" |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 101 | // CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-neon" |
Amara Emerson | ecbe18e | 2014-02-12 10:22:35 +0000 | [diff] [blame] | 102 | // CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto" |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 103 | |
Joey Gouly | 7db275b | 2013-06-27 13:19:54 +0000 | [diff] [blame] | 104 | // RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \ |
| 105 | // RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s |
Bernard Ogden | 18b5701 | 2013-10-29 09:47:51 +0000 | [diff] [blame] | 106 | // CHECK-FP-ARMV8-NOT: "-target-feature" "+neon" |
Joey Gouly | be8c273 | 2013-09-13 13:48:33 +0000 | [diff] [blame] | 107 | // CHECK-FP-ARMV8: "-target-feature" "+fp-armv8" |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 108 | // CHECK-FP-ARMV8: "-target-feature" "-neon" |
| 109 | // CHECK-FP-ARMV8: "-target-feature" "-crypto" |
Joey Gouly | 7db275b | 2013-06-27 13:19:54 +0000 | [diff] [blame] | 110 | |
| 111 | // RUN: %clang -target armv8-linux-gnueabihf -mfpu=neon-fp-armv8 %s -### 2>&1 \ |
| 112 | // RUN: | FileCheck --check-prefix=CHECK-NEON-FP-ARMV8 %s |
Joey Gouly | be8c273 | 2013-09-13 13:48:33 +0000 | [diff] [blame] | 113 | // CHECK-NEON-FP-ARMV8: "-target-feature" "+fp-armv8" |
Joey Gouly | 7db275b | 2013-06-27 13:19:54 +0000 | [diff] [blame] | 114 | // CHECK-NEON-FP-ARMV8: "-target-feature" "+neon" |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 115 | // CHECK-NEON-FP-ARMV8: "-target-feature" "-crypto" |
Tim Northover | 244950d | 2013-08-20 13:19:43 +0000 | [diff] [blame] | 116 | |
Amara Emerson | fc362c6 | 2013-09-19 13:54:03 +0000 | [diff] [blame] | 117 | // RUN: %clang -target armv8-linux-gnueabihf -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \ |
| 118 | // RUN: | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s |
Amara Emerson | fc362c6 | 2013-09-19 13:54:03 +0000 | [diff] [blame] | 119 | // CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+fp-armv8" |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 120 | // CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+neon" |
| 121 | // CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+crypto" |
Amara Emerson | fc362c6 | 2013-09-19 13:54:03 +0000 | [diff] [blame] | 122 | |
Amara Emerson | 4cdb87b | 2013-10-01 10:20:54 +0000 | [diff] [blame] | 123 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none %s -### 2>&1 \ |
| 124 | // RUN: | FileCheck --check-prefix=CHECK-NO-FP %s |
Asiri Rathnayake | fcd41ce | 2014-10-02 09:56:07 +0000 | [diff] [blame] | 125 | // CHECK-NO-FP: "-target-feature" "-neon" |
| 126 | // CHECK-NO-FP: "-target-feature" "-crypto" |
Amara Emerson | 4cdb87b | 2013-10-01 10:20:54 +0000 | [diff] [blame] | 127 | // CHECK-NO-FP: "-target-feature" "-vfp2" |
| 128 | // CHECK-NO-FP: "-target-feature" "-vfp3" |
| 129 | // CHECK-NO-FP: "-target-feature" "-vfp4" |
| 130 | // CHECK-NO-FP: "-target-feature" "-fp-armv8" |
Amara Emerson | 4cdb87b | 2013-10-01 10:20:54 +0000 | [diff] [blame] | 131 | |
Tim Northover | 244950d | 2013-08-20 13:19:43 +0000 | [diff] [blame] | 132 | // RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \ |
| 133 | // RUN: | FileCheck --check-prefix=CHECK-HF %s |
| 134 | // CHECK-HF: "-target-cpu" "arm1136jf-s" |
Rafael Espindola | 9c6fb0f | 2013-11-23 14:36:40 +0000 | [diff] [blame] | 135 | |
| 136 | // RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \ |
| 137 | // RUN: | FileCheck --check-prefix=ASM %s |
| 138 | // ASM-NOT: -target-feature |
Asiri Rathnayake | fcd41ce | 2014-10-02 09:56:07 +0000 | [diff] [blame] | 139 | |
| 140 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none -mfloat-abi=soft %s -### 2>&1 \ |
| 141 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 142 | // RUN: %clang -target armv7-linux-gnueabi -mfpu=none -mfloat-abi=soft %s -### 2>&1 \ |
| 143 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 144 | // RUN: %clang -target armv6-linux-gnueabi -mfpu=none -mfloat-abi=soft %s -### 2>&1 \ |
| 145 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 146 | // RUN: %clang -target armv5-linux-gnueabi -mfpu=none -mfloat-abi=soft %s -### 2>&1 \ |
| 147 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 148 | // RUN: %clang -target armv4-linux-gnueabi -mfpu=none -mfloat-abi=soft %s -### 2>&1 \ |
| 149 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 150 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none -msoft-float %s -### 2>&1 \ |
| 151 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 152 | // RUN: %clang -target armv7-linux-gnueabi -mfpu=none -msoft-float %s -### 2>&1 \ |
| 153 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 154 | // RUN: %clang -target armv6-linux-gnueabi -mfpu=none -msoft-float %s -### 2>&1 \ |
| 155 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 156 | // RUN: %clang -target armv5-linux-gnueabi -mfpu=none -msoft-float %s -### 2>&1 \ |
| 157 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 158 | // RUN: %clang -target armv4-linux-gnueabi -mfpu=none -msoft-float %s -### 2>&1 \ |
| 159 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 160 | // RUN: %clang -target armv8-linux-gnueabi -mfloat-abi=soft %s -### 2>&1 \ |
| 161 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 162 | // RUN: %clang -target armv7-linux-gnueabi -mfloat-abi=soft %s -### 2>&1 \ |
| 163 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 164 | // RUN: %clang -target armv6-linux-gnueabi -mfloat-abi=soft %s -### 2>&1 \ |
| 165 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 166 | // RUN: %clang -target armv5-linux-gnueabi -mfloat-abi=soft %s -### 2>&1 \ |
| 167 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 168 | // RUN: %clang -target armv4-linux-gnueabi -mfloat-abi=soft %s -### 2>&1 \ |
| 169 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 170 | // RUN: %clang -target armv8-linux-gnueabi -msoft-float %s -### 2>&1 \ |
| 171 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 172 | // RUN: %clang -target armv7-linux-gnueabi -msoft-float %s -### 2>&1 \ |
| 173 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 174 | // RUN: %clang -target armv6-linux-gnueabi -msoft-float %s -### 2>&1 \ |
| 175 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 176 | // RUN: %clang -target armv5-linux-gnueabi -msoft-float %s -### 2>&1 \ |
| 177 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 178 | // RUN: %clang -target armv4-linux-gnueabi -msoft-float %s -### 2>&1 \ |
| 179 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 180 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none %s -### 2>&1 \ |
| 181 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 182 | // RUN: %clang -target armv7-linux-gnueabi -mfpu=none %s -### 2>&1 \ |
| 183 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 184 | // RUN: %clang -target armv6-linux-gnueabi -mfpu=none %s -### 2>&1 \ |
| 185 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 186 | // RUN: %clang -target armv5-linux-gnueabi -mfpu=none %s -### 2>&1 \ |
| 187 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 188 | // RUN: %clang -target armv4-linux-gnueabi -mfpu=none %s -### 2>&1 \ |
| 189 | // RUN: | FileCheck --check-prefix=SOFT-ABI-FP %s |
| 190 | // SOFT-ABI-FP-NOT: error: |
| 191 | // SOFT-ABI-FP-NOT: warning: |
| 192 | // SOFT-ABI-FP-NOT: "-target-feature" "+{{[^ ]*fp[^ ]*}}" |
| 193 | // SOFT-ABI-FP: "-target-feature" "-neon" |
| 194 | // SOFT-ABI-FP: "-target-feature" "-crypto" |
| 195 | // SOFT-ABI-FP: "-target-feature" "-vfp2" |
| 196 | // SOFT-ABI-FP: "-target-feature" "-vfp3" |
| 197 | // SOFT-ABI-FP: "-target-feature" "-vfp4" |
| 198 | // SOFT-ABI-FP: "-target-feature" "-fp-armv8" |
| 199 | // SOFT-ABI-FP-NOT: "-target-feature" "+{{[^ ]*fp[^ ]*}}" |
| 200 | // SOFT-ABI-FP: "-msoft-float" |
| 201 | // SOFT-ABI-FP: "-mfloat-abi" "soft" |
| 202 | // SOFT-ABI-FP-NOT: "-target-feature" "+{{[^ ]*fp[^ ]*}}" |
| 203 | |
| 204 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none -mfloat-abi=softfp %s -### 2>&1 \ |
| 205 | // RUN: | FileCheck --check-prefix=ABI-IGNORE %s |
| 206 | // ABI-IGNORE: warning: -mfpu=none implies soft-float, ignoring conflicting option '-mfloat-abi=softfp' |
| 207 | |
| 208 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none -mfloat-abi=hard %s -### 2>&1 \ |
| 209 | // RUN: | FileCheck --check-prefix=ABI-ERROR %s |
| 210 | // ABI-ERROR: error: -mfpu=none implies soft-float, which conflicts with option '-mfloat-abi=hard' |
| 211 | |
| 212 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none -mhard-float %s -### 2>&1 \ |
| 213 | // RUN: | FileCheck --check-prefix=FP-ERROR %s |
| 214 | // FP-ERROR: error: -mfpu=none implies soft-float, which conflicts with option '-mhard-float' |
| 215 | |
| 216 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=vfp4 -mfloat-abi=soft %s -### 2>&1 \ |
| 217 | // RUN: | FileCheck --check-prefix=SOFT-ABI %s |
| 218 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=vfp4 -mfloat-abi=softfp %s -### 2>&1 \ |
| 219 | // RUN: | FileCheck --check-prefix=SOFT-ABI %s |
| 220 | // RUN: %clang -target armv8-freebsd-gnueabi -mfpu=vfp4 %s -### 2>&1 \ |
| 221 | // RUN: | FileCheck --check-prefix=SOFT-ABI %s |
| 222 | // SOFT-ABI-NOT: error: |
| 223 | // SOFT-ABI-NOT: warning: |
| 224 | // SOFT-ABI-NOT: "-msoft-float" |
| 225 | // SOFT-ABI: "-target-feature" "+vfp4" |
| 226 | // SOFT-ABI-NOT: "-msoft-float" |
| 227 | // SOFT-ABI: "-mfloat-abi" "soft" |
| 228 | // SOFT-ABI-NOT: "-msoft-float" |
| 229 | |
| 230 | // Floating point features should be disabled only when explicitly requested, |
| 231 | // otherwise we must respect target inferred defaults. |
| 232 | // |
| 233 | // RUN: %clang -target armv8-freebsd-gnueabi %s -### 2>&1 \ |
| 234 | // RUN: | FileCheck --check-prefix=DEFAULT-FP %s |
| 235 | // DEAFULT-FP-NOT: error: |
| 236 | // DEFAULT-FP-NOT: warning: |
| 237 | // DEFAULT-FP-NOT: "-target-feature" "-{{[^ ]*fp[^ ]*}}" |
| 238 | // DEFAULT-FP: "-msoft-float" "-mfloat-abi" "soft" |
| 239 | // DEFAULT-FP-NOT: "-target-feature" "-{{[^ ]*fp[^ ]*}}" |
| 240 | |
| 241 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=vfp4 -mfloat-abi=hard %s -### 2>&1 \ |
| 242 | // RUN: | FileCheck --check-prefix=VFP-ABI %s |
| 243 | // VFP-ABI-NOT: error: |
| 244 | // VFP-ABI-NOT: warning: |
| 245 | // VFP-ABI-NOT: "-msoft-float" |
| 246 | // VFP-ABI: "-target-feature" "+vfp4" |
| 247 | // VFP-ABI-NOT: "-msoft-float" |
| 248 | // VFP-ABI: "-mfloat-abi" "hard" |
| 249 | // VFP-ABI-NOT: "-msoft-float" |