1 | // Test that different values of -mfpu pick correct ARM FPU target-feature(s). |
2 | |
3 | // RUN: %clang -target arm-linux-eabi %s -### -o %t.o 2>&1 \ |
4 | // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s |
5 | // CHECK-DEFAULT-NOT: "-target-feature" "+soft-float" |
6 | // CHECK-DEFAULT: "-target-feature" "+soft-float-abi" |
7 | // CHECK-DEFAULT-NOT: "-target-feature" "+vfp2" |
8 | // CHECK-DEFAULT-NOT: "-target-feature" "+vfp3" |
9 | // CHECK-DEFAULT-NOT: "-target-feature" "+d16" |
10 | // CHECK-DEFAULT-NOT: "-target-feature" "+neon" |
11 | |
12 | // RUN: %clang -target arm-linux-eabi -mfpu=fpa %s -### -o %t.o 2>&1 \ |
13 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
14 | // RUN: %clang -target arm-linux-eabi -mfpu=fpe2 %s -### -o %t.o 2>&1 \ |
15 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
16 | // RUN: %clang -target arm-linux-eabi -mfpu=fpe3 %s -### -o %t.o 2>&1 \ |
17 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
18 | // RUN: %clang -target arm-linux-eabi -mfpu=maverick %s -### -o %t.o 2>&1 \ |
19 | // RUN: | FileCheck --check-prefix=CHECK-FPA %s |
20 | // CHECK-FPA: error: {{.*}} does not support '-mfpu={{fpa|fpe|fpe2|fpe3|maverick}}' |
21 | |
22 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -### -o %t.o 2>&1 \ |
23 | // RUN: | FileCheck --check-prefix=CHECK-VFP %s |
24 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -mfloat-abi=soft -### -o %t.o 2>&1 \ |
25 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-2 %s |
26 | // CHECK-VFP-NOT: "-target-feature" "+soft-float" |
27 | // CHECK-VFP: "-target-feature" "+soft-float-abi" |
28 | // CHECK-VFP: "-target-feature" "+vfp2" |
29 | // CHECK-VFP: "-target-feature" "-vfp3" |
30 | // CHECK-VFP: "-target-feature" "-vfp4" |
31 | // CHECK-VFP: "-target-feature" "-fp-armv8" |
32 | // CHECK-VFP: "-target-feature" "-neon" |
33 | // CHECK-SOFT-ABI-FP-2: "-target-feature" "+soft-float-abi" |
34 | // CHECK-SOFT-ABI-FP-2: "-target-feature" "-vfp3" |
35 | // CHECK-SOFT-ABI-FP-2: "-target-feature" "-vfp4" |
36 | // CHECK-SOFT-ABI-FP-2: "-target-feature" "-fp-armv8" |
37 | // CHECK-SOFT-ABI-FP-2: "-target-feature" "-neon" |
38 | // CHECK-SOFT-ABI-FP-2: "-target-feature" "-crypto" |
39 | // CHECK-SOFT-ABI-FP-2: "-target-feature" "-vfp2" |
40 | |
41 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp3 %s -### -o %t.o 2>&1 \ |
42 | // RUN: | FileCheck --check-prefix=CHECK-VFP3 %s |
43 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 %s -### -o %t.o 2>&1 \ |
44 | // RUN: | FileCheck --check-prefix=CHECK-VFP3 %s |
45 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
46 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s |
47 | // CHECK-VFP3-NOT: "-target-feature" "+soft-float" |
48 | // CHECK-VFP3: "-target-feature" "+soft-float-abi" |
49 | // CHECK-VFP3: "-target-feature" "+vfp3" |
50 | // CHECK-VFP3: "-target-feature" "-vfp4" |
51 | // CHECK-VFP3: "-target-feature" "-fp-armv8" |
52 | // CHECK-VFP3: "-target-feature" "-neon" |
53 | // CHECK-SOFT-ABI-FP-3: "-target-feature" "+soft-float-abi" |
54 | // CHECK-SOFT-ABI-FP-3: "-target-feature" "-vfp2" |
55 | // CHECK-SOFT-ABI-FP-3: "-target-feature" "-vfp4" |
56 | // CHECK-SOFT-ABI-FP-3: "-target-feature" "-fp-armv8" |
57 | // CHECK-SOFT-ABI-FP-3: "-target-feature" "-neon" |
58 | // CHECK-SOFT-ABI-FP-3: "-target-feature" "-crypto" |
59 | // CHECK-SOFT-ABI-FP-3: "-target-feature" "-vfp3" |
60 | |
61 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 %s -### -o %t.o 2>&1 \ |
62 | // RUN: | FileCheck --check-prefix=CHECK-VFP3-FP16 %s |
63 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
64 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s |
65 | // CHECK-VFP3-FP16-NOT: "-target-feature" "+soft-float" |
66 | // CHECK-VFP3-FP16: "-target-feature" "+soft-float-abi" |
67 | // CHECK-VFP3-FP16: "-target-feature" "-fp-only-sp" |
68 | // CHECK-VFP3-FP16: "-target-feature" "-d16" |
69 | // CHECK-VFP3-FP16: "-target-feature" "+vfp3" |
70 | // CHECK-VFP3-FP16: "-target-feature" "+fp16" |
71 | // CHECK-VFP3-FP16: "-target-feature" "-vfp4" |
72 | // CHECK-VFP3-FP16: "-target-feature" "-fp-armv8" |
73 | // CHECK-VFP3-FP16: "-target-feature" "-neon" |
74 | // CHECK-VFP3-FP16: "-target-feature" "-crypto" |
75 | |
76 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \ |
77 | // RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s |
78 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \ |
79 | // RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s |
80 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
81 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s |
82 | // CHECK-VFP3-D16-NOT: "-target-feature" "+soft-float" |
83 | // CHECK-VFP3-D16: "-target-feature" "+soft-float-abi" |
84 | // CHECK-VFP3-D16: "-target-feature" "-fp-only-sp" |
85 | // CHECK-VFP3-D16: "-target-feature" "+d16" |
86 | // CHECK-VFP3-D16: "-target-feature" "+vfp3" |
87 | // CHECK-VFP3-D16: "-target-feature" "-vfp4" |
88 | // CHECK-VFP3-D16: "-target-feature" "-fp-armv8" |
89 | // CHECK-VFP3-D16: "-target-feature" "-neon" |
90 | |
91 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 %s -### -o %t.o 2>&1 \ |
92 | // RUN: | FileCheck --check-prefix=CHECK-VFP3-D16-FP16 %s |
93 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
94 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s |
95 | // CHECK-VFP3-D16-FP16-NOT: "-target-feature" "+soft-float" |
96 | // CHECK-VFP3-D16-FP16: "-target-feature" "+soft-float-abi" |
97 | // CHECK-VFP3-D16-FP16: "-target-feature" "-fp-only-sp" |
98 | // CHECK-VFP3-D16-FP16: "-target-feature" "+d16" |
99 | // CHECK-VFP3-D16-FP16: "-target-feature" "+vfp3" |
100 | // CHECK-VFP3-D16-FP16: "-target-feature" "+fp16" |
101 | // CHECK-VFP3-D16-FP16: "-target-feature" "-vfp4" |
102 | // CHECK-VFP3-D16-FP16: "-target-feature" "-fp-armv8" |
103 | // CHECK-VFP3-D16-FP16: "-target-feature" "-neon" |
104 | // CHECK-VFP3-D16-FP16: "-target-feature" "-crypto" |
105 | |
106 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd %s -### -o %t.o 2>&1 \ |
107 | // RUN: | FileCheck --check-prefix=CHECK-VFP3XD %s |
108 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
109 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s |
110 | // CHECK-VFP3XD-NOT: "-target-feature" "+soft-float" |
111 | // CHECK-VFP3XD: "-target-feature" "+soft-float-abi" |
112 | // CHECK-VFP3XD: "-target-feature" "+fp-only-sp" |
113 | // CHECK-VFP3XD: "-target-feature" "+d16" |
114 | // CHECK-VFP3XD: "-target-feature" "+vfp3" |
115 | // CHECK-VFP3XD: "-target-feature" "-fp16" |
116 | // CHECK-VFP3XD: "-target-feature" "-vfp4" |
117 | // CHECK-VFP3XD: "-target-feature" "-fp-armv8" |
118 | // CHECK-VFP3XD: "-target-feature" "-neon" |
119 | // CHECK-VFP3XD: "-target-feature" "-crypto" |
120 | |
121 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 %s -### -o %t.o 2>&1 \ |
122 | // RUN: | FileCheck --check-prefix=CHECK-VFP3XD-FP16 %s |
123 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
124 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s |
125 | // CHECK-VFP3XD-FP16-NOT: "-target-feature" "+soft-float" |
126 | // CHECK-VFP3XD-FP16: "-target-feature" "+soft-float-abi" |
127 | // CHECK-VFP3XD-FP16: "-target-feature" "+fp-only-sp" |
128 | // CHECK-VFP3XD-FP16: "-target-feature" "+d16" |
129 | // CHECK-VFP3XD-FP16: "-target-feature" "+vfp3" |
130 | // CHECK-VFP3XD-FP16: "-target-feature" "+fp16" |
131 | // CHECK-VFP3XD-FP16: "-target-feature" "-vfp4" |
132 | // CHECK-VFP3XD-FP16: "-target-feature" "-fp-armv8" |
133 | // CHECK-VFP3XD-FP16: "-target-feature" "-neon" |
134 | // CHECK-VFP3XD-FP16: "-target-feature" "-crypto" |
135 | |
136 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \ |
137 | // RUN: | FileCheck --check-prefix=CHECK-VFP4 %s |
138 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \ |
139 | // RUN: | FileCheck --check-prefix=CHECK-VFP4 %s |
140 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
141 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s |
142 | // CHECK-VFP4-NOT: "-target-feature" "+soft-float" |
143 | // CHECK-VFP4: "-target-feature" "+soft-float-abi" |
144 | // CHECK-VFP4: "-target-feature" "+vfp4" |
145 | // CHECK-VFP4: "-target-feature" "-fp-armv8" |
146 | // CHECK-VFP4: "-target-feature" "-neon" |
147 | // CHECK-SOFT-ABI-FP-4: "-target-feature" "+soft-float-abi" |
148 | // CHECK-SOFT-ABI-FP-4: "-target-feature" "-vfp2" |
149 | // CHECK-SOFT-ABI-FP-4: "-target-feature" "-vfp3" |
150 | // CHECK-SOFT-ABI-FP-4: "-target-feature" "-fp-armv8" |
151 | // CHECK-SOFT-ABI-FP-4: "-target-feature" "-neon" |
152 | // CHECK-SOFT-ABI-FP-4: "-target-feature" "-crypto" |
153 | // CHECK-SOFT-ABI-FP-4: "-target-feature" "-vfp4" |
154 | |
155 | // RUN: %clang -target arm-linux-eabi -mfpu=vfp4-d16 %s -### -o %t.o 2>&1 \ |
156 | // RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s |
157 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 %s -### -o %t.o 2>&1 \ |
158 | // RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s |
159 | // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
160 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s |
161 | // CHECK-VFP4-D16-NOT: "-target-feature" "+soft-float" |
162 | // CHECK-VFP4-D16: "-target-feature" "+soft-float-abi" |
163 | // CHECK-VFP4-D16: "-target-feature" "-fp-only-sp" |
164 | // CHECK-VFP4-D16: "-target-feature" "+d16" |
165 | // CHECK-VFP4-D16: "-target-feature" "+vfp4" |
166 | // CHECK-VFP4-D16: "-target-feature" "-fp-armv8" |
167 | // CHECK-VFP4-D16: "-target-feature" "-neon" |
168 | |
169 | // RUN: %clang -target arm-linux-eabi -mfpu=fp4-sp-d16 %s -### -o %t.o 2>&1 \ |
170 | // RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s |
171 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 %s -### -o %t.o 2>&1 \ |
172 | // RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s |
173 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
174 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s |
175 | // CHECK-FP4-SP-D16-NOT: "-target-feature" "+soft-float" |
176 | // CHECK-FP4-SP-D16: "-target-feature" "+soft-float-abi" |
177 | // CHECK-FP4-SP-D16: "-target-feature" "+fp-only-sp" |
178 | // CHECK-FP4-SP-D16: "-target-feature" "+d16" |
179 | // CHECK-FP4-SP-D16: "-target-feature" "+vfp4" |
180 | // CHECK-FP4-SP-D16: "-target-feature" "-fp-armv8" |
181 | // CHECK-FP4-SP-D16: "-target-feature" "-neon" |
182 | |
183 | // RUN: %clang -target arm-linux-eabi -mfpu=fp5-sp-d16 %s -### -o %t.o 2>&1 \ |
184 | // RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s |
185 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv5-sp-d16 %s -### -o %t.o 2>&1 \ |
186 | // RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s |
187 | // RUN: %clang -target arm-linux-eabi -mfpu=fp-armv8-sp-d16 -mfloat-abi=soft %s -### -o %t.o \ |
188 | // RUN: 2>&1 | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
189 | // CHECK-FP5-SP-D16-NOT: "-target-feature" "+soft-float" |
190 | // CHECK-FP5-SP-D16: "-target-feature" "+soft-float-abi" |
191 | // CHECK-FP5-SP-D16: "-target-feature" "+fp-only-sp" |
192 | // CHECK-FP5-SP-D16: "-target-feature" "+d16" |
193 | // CHECK-FP5-SP-D16: "-target-feature" "+fp-armv8" |
194 | // CHECK-FP5-SP-D16: "-target-feature" "-neon" |
195 | // CHECK-FP5-SP-D16: "-target-feature" "-crypto" |
196 | |
197 | // RUN: %clang -target arm-linux-eabi -mfpu=fp5-dp-d16 %s -### -o %t.o 2>&1 \ |
198 | // RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s |
199 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -### -o %t.o 2>&1 \ |
200 | // RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s |
201 | // RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -mfloat-abi=soft -### -o %t.o 2>&1 \ |
202 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-5 %s |
203 | // CHECK-FP5-DP-D16-NOT: "-target-feature" "+soft-float" |
204 | // CHECK-FP5-DP-D16: "-target-feature" "+soft-float-abi" |
205 | // CHECK-FP5-DP-D16: "-target-feature" "-fp-only-sp" |
206 | // CHECK-FP5-DP-D16: "-target-feature" "+d16" |
207 | // CHECK-FP5-DP-D16: "-target-feature" "+fp-armv8" |
208 | // CHECK-FP5-DP-D16: "-target-feature" "-neon" |
209 | // CHECK-FP5-DP-D16: "-target-feature" "-crypto" |
210 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "+soft-float" |
211 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "+soft-float-abi" |
212 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "-vfp2" |
213 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "-vfp3" |
214 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "-vfp4" |
215 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "-neon" |
216 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "-crypto" |
217 | // CHECK-SOFT-ABI-FP-5: "-target-feature" "-fp-armv8" |
218 | |
219 | // RUN: %clang -target arm-linux-eabi -mfpu=neon %s -### -o %t.o 2>&1 \ |
220 | // RUN: | FileCheck --check-prefix=CHECK-NEON %s |
221 | // RUN: %clang -target arm-linux-eabi -mfpu=neon -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
222 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s |
223 | // CHECK-NEON-NOT: "-target-feature" "+soft-float" |
224 | // CHECK-NEON: "-target-feature" "+neon" |
225 | // CHECK-SOFT-ABI-FP-6: "-target-feature" "+soft-float-abi" |
226 | // CHECK-SOFT-ABI-FP-6: "-target-feature" "-vfp2" |
227 | // CHECK-SOFT-ABI-FP-6: "-target-feature" "-vfp4" |
228 | // CHECK-SOFT-ABI-FP-6: "-target-feature" "-fp-armv8" |
229 | // CHECK-SOFT-ABI-FP-6: "-target-feature" "-crypto" |
230 | // CHECK-SOFT-ABI-FP-6: "-target-feature" "-vfp3" |
231 | // CHECK-SOFT-ABI-FP-6: "-target-feature" "-neon" |
232 | |
233 | // RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 %s -### -o %t.o 2>&1 \ |
234 | // RUN: | FileCheck --check-prefix=CHECK-NEON-FP16 %s |
235 | // RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
236 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s |
237 | // CHECK-NEON-FP16-NOT: "-target-feature" "+soft-float" |
238 | // CHECK-NEON-FP16: "-target-feature" "+soft-float-abi" |
239 | // CHECK-NEON-FP16: "-target-feature" "-fp-only-sp" |
240 | // CHECK-NEON-FP16: "-target-feature" "-d16" |
241 | // CHECK-NEON-FP16: "-target-feature" "+vfp3" |
242 | // CHECK-NEON-FP16: "-target-feature" "+fp16" |
243 | // CHECK-NEON-FP16: "-target-feature" "-vfp4" |
244 | // CHECK-NEON-FP16: "-target-feature" "-fp-armv8" |
245 | // CHECK-NEON-FP16: "-target-feature" "+neon" |
246 | // CHECK-NEON-FP16: "-target-feature" "-crypto" |
247 | |
248 | // RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 %s -### -o %t.o 2>&1 \ |
249 | // RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV3 %s |
250 | // RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
251 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s |
252 | // CHECK-NEON-VFPV3-NOT: "-target-feature" "+soft-float" |
253 | // CHECK-NEON-VFPV3: "-target-feature" "+soft-float-abi" |
254 | // CHECK-NEON-VFPV3: "-target-feature" "+vfp3" |
255 | // CHECK-NEON-VFPV3: "-target-feature" "+neon" |
256 | |
257 | // RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 %s -### -o %t.o 2>&1 \ |
258 | // RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV4 %s |
259 | // RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 -mfloat-abi=soft %s -### -o %t.o 2>&1 \ |
260 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-7 %s |
261 | // CHECK-NEON-VFPV4-NOT: "-target-feature" "+soft-float" |
262 | // CHECK-NEON-VFPV4: "-target-feature" "+soft-float-abi" |
263 | // CHECK-NEON-VFPV4: "-target-feature" "+vfp4" |
264 | // CHECK-NEON-VFPV4: "-target-feature" "+neon" |
265 | // CHECK-SOFT-ABI-FP-7: "-target-feature" "+soft-float-abi" |
266 | // CHECK-SOFT-ABI-FP-7: "-target-feature" "-vfp2" |
267 | // CHECK-SOFT-ABI-FP-7: "-target-feature" "-vfp3" |
268 | // CHECK-SOFT-ABI-FP-7: "-target-feature" "-fp-armv8" |
269 | // CHECK-SOFT-ABI-FP-7: "-target-feature" "-crypto" |
270 | // CHECK-SOFT-ABI-FP-7: "-target-feature" "-vfp4" |
271 | // CHECK-SOFT-ABI-FP-7: "-target-feature" "-neon" |
272 | |
273 | // RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \ |
274 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
275 | // RUN: %clang -target armv8 %s -### 2>&1 \ |
276 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
277 | // RUN: %clang -target armv8a -mfpu=neon %s -### -c 2>&1 \ |
278 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-8 %s |
279 | // CHECK-SOFT-ABI-FP-8: "-target-feature" "+soft-float-abi" |
280 | // CHECK-SOFT-ABI-FP-8: "-target-feature" "-vfp2" |
281 | // CHECK-SOFT-ABI-FP-8: "-target-feature" "-vfp4" |
282 | // CHECK-SOFT-ABI-FP-8: "-target-feature" "-fp-armv8" |
283 | // CHECK-SOFT-ABI-FP-8: "-target-feature" "-crypto" |
284 | // CHECK-SOFT-ABI-FP-8: "-target-feature" "-vfp3" |
285 | // CHECK-SOFT-ABI-FP-8: "-target-feature" "-neon" |
286 | |
287 | // RUN: %clang -target armv8 -mfpu=fp-armv8 %s -### 2>&1 \ |
288 | // RUN: | FileCheck --check-prefix=CHECK-ARMV8-SOFT-FLOAT %s |
289 | // CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+soft-float" |
290 | // CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+soft-float-abi" |
291 | // NOT-CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+fp-armv8" |
292 | // CHECK-ARMV9-SOFT-FLOAT: "-target-feature" "-neon" |
293 | // CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto" |
294 | |
295 | // RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \ |
296 | // RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s |
297 | // CHECK-FP-ARMV8-NOT: "-target-feature" "+soft-float" |
298 | // CHECK-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi" |
299 | // CHECK-FP-ARMV8: "-target-feature" "+fp-armv8" |
300 | // CHECK-FP-ARMV8: "-target-feature" "-neon" |
301 | // CHECK-FP-ARMV8: "-target-feature" "-crypto" |
302 | |
303 | // RUN: %clang -target armv8-linux-gnueabihf -mfpu=neon-fp-armv8 %s -### 2>&1 \ |
304 | // RUN: | FileCheck --check-prefix=CHECK-NEON-FP-ARMV8 %s |
305 | // CHECK-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float" |
306 | // CHECK-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi" |
307 | // CHECK-NEON-FP-ARMV8: "-target-feature" "+fp-armv8" |
308 | // CHECK-NEON-FP-ARMV8: "-target-feature" "+neon" |
309 | // CHECK-NEON-FP-ARMV8: "-target-feature" "-crypto" |
310 | |
311 | // RUN: %clang -target armv8-linux-gnueabihf -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \ |
312 | // RUN: | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s |
313 | // CHECK-CRYPTO-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float" |
314 | // CHECK-CRYPTO-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi" |
315 | // CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+fp-armv8" |
316 | // CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+crypto" |
317 | |
318 | // RUN: %clang -target armv8-linux-gnueabi -mfpu=none %s -### 2>&1 \ |
319 | // RUN: | FileCheck --check-prefix=CHECK-NO-FP %s |
320 | // CHECK-NO-FP-NOT: "-target-feature" "+soft-float" |
321 | // CHECK-NO-FP: "-target-feature" "+soft-float-abi" |
322 | // CHECK-NO-FP: "-target-feature" "-fp-only-sp" |
323 | // CHECK-NO-FP: "-target-feature" "-d16" |
324 | // CHECK-NO-FP: "-target-feature" "-vfp2" |
325 | // CHECK-NO-FP: "-target-feature" "-vfp3" |
326 | // CHECK-NO-FP: "-target-feature" "-vfp4" |
327 | // CHECK-NO-FP: "-target-feature" "-fp-armv8" |
328 | // CHECK-NO-FP: "-target-feature" "-neon" |
329 | // CHECK-NO-FP: "-target-feature" "-crypto" |
330 | |
331 | // RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \ |
332 | // RUN: | FileCheck --check-prefix=CHECK-HF %s |
333 | // RUN: %clang -target arm-linux-musleabihf %s -### 2>&1 \ |
334 | // RUN: | FileCheck --check-prefix=CHECK-HF %s |
335 | // CHECK-HF-NOT: "-target-feature" "+soft-float" |
336 | // CHECK-HF-NOT: "-target-feature" "+soft-float-abi" |
337 | // CHECK-HF: "-target-cpu" "arm1176jzf-s" |
338 | |
339 | // RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \ |
340 | // RUN: | FileCheck --check-prefix=ASM %s |
341 | // ASM-NOT: -target-feature |
342 | |
343 | // RUN: %clang -target armv8-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \ |
344 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
345 | // RUN: %clang -target armv7-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \ |
346 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
347 | // RUN: %clang -target armv6-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \ |
348 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
349 | // RUN: %clang -target armv5-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \ |
350 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
351 | // RUN: %clang -target armv4-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \ |
352 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
353 | // RUN: %clang -target armv8-linux-gnueabi -msoft-float -mfpu=none %s -### -c 2>&1 \ |
354 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
355 | // RUN: %clang -target armv8-linux-gnueabi -mfloat-abi=soft %s -### -c 2>&1 \ |
356 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
357 | // RUN: %clang -target armv8-linux-gnueabi -msoft-float %s -### -c 2>&1 \ |
358 | // RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s |
359 | // CHECK-SOFT-ABI-FP: "-target-feature" "+soft-float" |
360 | // CHECK-SOFT-ABI-FP: "-target-feature" "+soft-float-abi" |
361 | // CHECK-SOFT-ABI-FP: "-target-feature" "-vfp2" |
362 | // CHECK-SOFT-ABI-FP: "-target-feature" "-vfp3" |
363 | // CHECK-SOFT-ABI-FP: "-target-feature" "-vfp4" |
364 | // CHECK-SOFT-ABI-FP: "-target-feature" "-fp-armv8" |
365 | // CHECK-SOFT-ABI-FP: "-target-feature" "-neon" |
366 | // CHECK-SOFT-ABI-FP: "-target-feature" "-crypto" |
367 | |
368 | // RUN: %clang -target arm-linux-androideabi21 %s -### -c 2>&1 \ |
369 | // RUN: | FileCheck --check-prefix=CHECK-ARM5-ANDROID-FP-DEFAULT %s |
370 | // CHECK-ARM5-ANDROID-FP-DEFAULT: "-target-feature" "+soft-float" |
371 | // CHECK-ARM5-ANDROID-FP-DEFAULT: "-target-feature" "+soft-float-abi" |
372 | // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+d16" |
373 | // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp3" |
374 | // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp4" |
375 | // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8" |
376 | // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+neon" |
377 | // CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+crypto" |
378 | |
379 | // RUN: %clang -target armv7-linux-androideabi21 %s -### -c 2>&1 \ |
380 | // RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-DEFAULT %s |
381 | // CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+soft-float" |
382 | // CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+soft-float-abi" |
383 | // CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+vfp3" |
384 | // CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp4" |
385 | // CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8" |
386 | // CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+neon" |
387 | // CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+crypto" |
388 | |
389 | // RUN: %clang -target armv7-linux-androideabi21 %s -mfpu=vfp3-d16 -### -c 2>&1 \ |
390 | // RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-D16 %s |
391 | // CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+soft-float" |
392 | // CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+soft-float-abi" |
393 | // CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+d16" |
394 | // CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+vfp3" |
395 | // CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+vfp4" |
396 | // CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+fp-armv8" |
397 | // CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+neon" |
398 | // CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+crypto" |
399 | |