[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / mips-features.c
blobee370051d1ebed6ba789d40a34c776389e1f8537
1 // Check handling MIPS specific features options.
2 //
3 // -mabicalls
4 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mabicalls 2>&1 \
5 // RUN: | FileCheck --check-prefix=CHECK-MABICALLS %s
6 // CHECK-MABICALLS: "-target-feature" "-noabicalls"
7 //
8 // -mno-abicalls
9 // RUN: %clang --target=mips-linux-gnu -### -c %s -mabicalls -mno-abicalls 2>&1 \
10 // RUN: | FileCheck --check-prefix=CHECK-MNOABICALLS %s
11 // CHECK-MNOABICALLS: "-target-feature" "+noabicalls"
13 // -mno-abicalls non-PIC N64
14 // RUN: %clang --target=mips64-linux-gnu -### -c -fno-PIC -mno-abicalls %s 2>&1 \
15 // RUN: | FileCheck --check-prefix=CHECK-MNOABICALLS-N64NPIC %s
16 // CHECK-MNOABICALLS-N64NPIC: "-target-feature" "+noabicalls"
18 // -mgpopt
19 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-gpopt -mgpopt -Wno-unsupported-gpopt 2>&1 \
20 // RUN: | FileCheck --check-prefix=CHECK-MGPOPT-DEF-ABICALLS %s
21 // CHECK-MGPOPT-DEF-ABICALLS-NOT: "-mllvm" "-mgpopt"
23 // -mabicalls -mgpopt
24 // RUN: %clang --target=mips-linux-gnu -### -c %s -mabicalls -mno-gpopt -mgpopt -Wno-unsupported-gpopt 2>&1 \
25 // RUN: | FileCheck --check-prefix=CHECK-MGPOPT-EXPLICIT-ABICALLS %s
26 // CHECK-MGPOPT-EXPLICIT-ABICALLS-NOT: "-mllvm" "-mgpopt"
28 // -mno-abicalls -mgpopt
29 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mno-gpopt -mgpopt 2>&1 \
30 // RUN: | FileCheck --check-prefix=CHECK-MGPOPT %s
31 // CHECK-MGPOPT: "-mllvm" "-mgpopt"
33 // -mno-abicalls -mno-gpopt
34 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt -mno-gpopt 2>&1 \
35 // RUN: | FileCheck --check-prefix=CHECK-MNOGPOPT %s
36 // CHECK-MNOGPOPT-NOT: "-mllvm" "-mgpopt"
38 // -mno-abicalls
39 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls 2>&1 \
40 // RUN: | FileCheck --check-prefix=CHECK-MGPOPTDEF %s
41 // CHECK-MGPOPTDEF: "-mllvm" "-mgpopt"
43 // -mgpopt -mno-abicalls -mlocal-sdata
44 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mno-gpopt -mgpopt -mno-local-sdata -mlocal-sdata 2>&1 \
45 // RUN: | FileCheck --check-prefix=CHECK-MLOCALSDATA %s
46 // CHECK-MLOCALSDATA: "-mllvm" "-mlocal-sdata=1"
48 // -mgpopt -mno-abicalls -mno-local-sdata
49 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mno-gpopt -mgpopt -mlocal-sdata -mno-local-sdata 2>&1 \
50 // RUN: | FileCheck --check-prefix=CHECK-MNOLOCALSDATA %s
51 // CHECK-MNOLOCALSDATA: "-mllvm" "-mlocal-sdata=0"
53 // -mgpopt -mno-abicalls
54 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt 2>&1 \
55 // RUN: | FileCheck --check-prefix=CHECK-MLOCALSDATADEF %s
56 // CHECK-MLOCALSDATADEF-NOT: "-mllvm" "-mlocal-sdata"
58 // -mno-abicalls -mgpopt -mextern-sdata
59 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt -mno-extern-sdata -mextern-sdata 2>&1 \
60 // RUN: | FileCheck --check-prefix=CHECK-MEXTERNSDATA %s
61 // CHECK-MEXTERNSDATA: "-mllvm" "-mextern-sdata=1"
63 // -mno-abicalls -mgpopt -mno-extern-sdata
64 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt -mextern-sdata -mno-extern-sdata 2>&1 \
65 // RUN: | FileCheck --check-prefix=CHECK-MNOEXTERNSDATA %s
66 // CHECK-MNOEXTERNSDATA: "-mllvm" "-mextern-sdata=0"
68 // -mno-abicalls -mgpopt
69 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt 2>&1 \
70 // RUN: | FileCheck --check-prefix=CHECK-MEXTERNSDATADEF %s
71 // CHECK-MEXTERNSDATADEF-NOT: "-mllvm" "-mextern-sdata"
73 // -mno-abicalls -mgpopt -membedded-data
74 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt -mno-embedded-data -membedded-data 2>&1 \
75 // RUN: | FileCheck --check-prefix=CHECK-MEMBEDDEDDATA %s
76 // CHECK-MEMBEDDEDDATA: "-mllvm" "-membedded-data=1"
78 // -mno-abicalls -mgpopt -mno-embedded-data
79 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt -membedded-data -mno-embedded-data 2>&1 \
80 // RUN: | FileCheck --check-prefix=CHECK-MNOEMBEDDEDDATA %s
81 // CHECK-MNOEMBEDDEDDATA: "-mllvm" "-membedded-data=0"
83 // -mno-abicalls -mgpopt
84 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-abicalls -mgpopt 2>&1 \
85 // RUN: | FileCheck --check-prefix=CHECK-MEMBEDDEDDATADEF %s
86 // CHECK-MEMBEDDEDDATADEF-NOT: "-mllvm" "-membedded-data"
88 // MIPS64 + N64: -fno-pic -> -mno-abicalls -mgpopt
89 // RUN: %clang --target=mips64-mti-elf -mabi=64 -### -c %s -fno-pic -mno-abicalls 2>&1 \
90 // RUN: | FileCheck --check-prefix=CHECK-N64-GPOPT %s
91 // CHECK-N64-GPOPT: "-target-feature" "+noabicalls"
92 // CHECK-N64-GPOPT: "-mllvm" "-mgpopt"
94 // MIPS64 + N64: -fno-pic -mno-gpopt
95 // RUN: %clang --target=mips64-mti-elf -mabi=64 -### -c %s -fno-pic -mno-abicalls -mno-gpopt 2>&1 \
96 // RUN: | FileCheck --check-prefix=CHECK-N64-MNO-GPOPT %s
97 // CHECK-N64-MNO-GPOPT: "-target-feature" "+noabicalls"
98 // CHECK-N64-MNO-GPOPT-NOT: "-mllvm" "-mgpopt"
100 // MIPS64 + N64: -mgpopt (-fpic is implicit)
101 // RUN: %clang --target=mips64-mti-linux-gnu -mabi=64 -### -c %s -mgpopt 2>&1 \
102 // RUN: | FileCheck --check-prefix=CHECK-N64-PIC-GPOPT %s
103 // CHECK-N64-PIC-GPOPT-NOT: "-mllvm" "-mgpopt"
104 // CHECK-N64-PIC-GPOPT: ignoring '-mgpopt' option as it cannot be used with the implicit usage of -mabicalls
106 // -mips16
107 // RUN: %clang --target=mips-linux-gnu -### -c %s \
108 // RUN: -mno-mips16 -mips16 2>&1 \
109 // RUN: | FileCheck --check-prefix=CHECK-MIPS16 %s
110 // CHECK-MIPS16: "-target-feature" "+mips16"
112 // -mno-mips16
113 // RUN: %clang --target=mips-linux-gnu -### -c %s \
114 // RUN: -mips16 -mno-mips16 2>&1 \
115 // RUN: | FileCheck --check-prefix=CHECK-NOMIPS16 %s
116 // CHECK-NOMIPS16: "-target-feature" "-mips16"
118 // -mmicromips
119 // RUN: %clang --target=mips-linux-gnu -### -c %s \
120 // RUN: -mno-micromips -mmicromips 2>&1 \
121 // RUN: | FileCheck --check-prefix=CHECK-MICROMIPS %s
122 // CHECK-MICROMIPS: "-target-feature" "+micromips"
124 // -mno-micromips
125 // RUN: %clang --target=mips-linux-gnu -### -c %s \
126 // RUN: -mmicromips -mno-micromips 2>&1 \
127 // RUN: | FileCheck --check-prefix=CHECK-NOMICROMIPS %s
128 // CHECK-NOMICROMIPS: "-target-feature" "-micromips"
130 // -mdsp
131 // RUN: %clang --target=mips-linux-gnu -### -c %s \
132 // RUN: -mno-dsp -mdsp 2>&1 \
133 // RUN: | FileCheck --check-prefix=CHECK-MDSP %s
134 // CHECK-MDSP: "-target-feature" "+dsp"
136 // -mno-dsp
137 // RUN: %clang --target=mips-linux-gnu -### -c %s \
138 // RUN: -mdsp -mno-dsp 2>&1 \
139 // RUN: | FileCheck --check-prefix=CHECK-NOMDSP %s
140 // CHECK-NOMDSP: "-target-feature" "-dsp"
142 // -mdspr2
143 // RUN: %clang --target=mips-linux-gnu -### -c %s \
144 // RUN: -mno-dspr2 -mdspr2 2>&1 \
145 // RUN: | FileCheck --check-prefix=CHECK-MDSPR2 %s
146 // CHECK-MDSPR2: "-target-feature" "+dspr2"
148 // -mno-dspr2
149 // RUN: %clang --target=mips-linux-gnu -### -c %s \
150 // RUN: -mdspr2 -mno-dspr2 2>&1 \
151 // RUN: | FileCheck --check-prefix=CHECK-NOMDSPR2 %s
152 // CHECK-NOMDSPR2: "-target-feature" "-dspr2"
154 // -mmsa
155 // RUN: %clang --target=mips-linux-gnu -### -c %s \
156 // RUN: -mno-msa -mmsa 2>&1 \
157 // RUN: | FileCheck --check-prefix=CHECK-MMSA %s
158 // CHECK-MMSA: "-target-feature" "+msa"
160 // -mno-msa
161 // RUN: %clang --target=mips-linux-gnu -### -c %s \
162 // RUN: -mmsa -mno-msa 2>&1 \
163 // RUN: | FileCheck --check-prefix=CHECK-NOMMSA %s
164 // CHECK-NOMMSA: "-target-feature" "-msa"
166 // -mmsa
167 // RUN: %clang --target=mips-linux-gnu -### -c %s \
168 // RUN: -mmsa 2>&1 \
169 // RUN: | FileCheck --check-prefix=CHECK-MMSA-MFP64 %s
170 // CHECK-MMSA-MFP64: "-target-feature" "+msa" "-target-feature" "+fp64"
172 // -mmt
173 // RUN: %clang --target=mips-linux-gnu -### -c %s \
174 // RUN: -mno-mt -mmt 2>&1 \
175 // RUN: | FileCheck --check-prefix=CHECK-MMT %s
176 // CHECK-MMT: "-target-feature" "+mt"
178 // -mno-mt
179 // RUN: %clang --target=mips-linux-gnu -### -c %s \
180 // RUN: -mmt -mno-mt 2>&1 \
181 // RUN: | FileCheck --check-prefix=CHECK-NOMMT %s
182 // CHECK-NOMMT: "-target-feature" "-mt"
184 // -modd-spreg
185 // RUN: %clang --target=mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \
186 // RUN: | FileCheck --check-prefix=CHECK-MODDSPREG %s
187 // CHECK-MODDSPREG: "-target-feature" "-nooddspreg"
189 // -mno-odd-spreg
190 // RUN: %clang --target=mips-linux-gnu -### -c %s -modd-spreg -mno-odd-spreg 2>&1 \
191 // RUN: | FileCheck --check-prefix=CHECK-NOMODDSPREG %s
192 // CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg"
194 // -mfpxx
195 // RUN: %clang --target=mips-linux-gnu -### -c %s -mfpxx 2>&1 \
196 // RUN: | FileCheck --check-prefix=CHECK-MFPXX %s
197 // CHECK-MFPXX: "-target-feature" "+fpxx"
198 // CHECK-MFPXX: "-target-feature" "+nooddspreg"
200 // -mfpxx -modd-spreg
201 // RUN: %clang --target=mips-linux-gnu -### -c %s -mfpxx -modd-spreg 2>&1 \
202 // RUN: | FileCheck --check-prefix=CHECK-MFPXX-ODDSPREG %s
203 // CHECK-MFPXX-ODDSPREG: "-target-feature" "+fpxx"
204 // CHECK-MFPXX-ODDSPREG: "-target-feature" "-nooddspreg"
206 // -mfp64
207 // RUN: %clang --target=mips-linux-gnu -### -c %s \
208 // RUN: -mfp32 -mfp64 2>&1 \
209 // RUN: | FileCheck --check-prefix=CHECK-MFP64 %s
210 // CHECK-MFP64: "-target-feature" "+fp64"
212 // -mfp32
213 // RUN: %clang --target=mips-linux-gnu -### -c %s \
214 // RUN: -mfp64 -mfp32 2>&1 \
215 // RUN: | FileCheck --check-prefix=CHECK-NOMFP64 %s
216 // CHECK-NOMFP64: "-target-feature" "-fp64"
218 // -mnan=2008
219 // RUN: %clang --target=mips-linux-gnu -march=mips32r3 -### -c %s \
220 // RUN: -mnan=legacy -mnan=2008 2>&1 \
221 // RUN: | FileCheck --check-prefix=CHECK-NAN2008 %s
222 // CHECK-NAN2008: "-target-feature" "+nan2008" "-target-feature" "+abs2008"
224 // -mnan=2008 -mabs=legacy
225 // RUN: %clang --target=mips-linux-gnu -march=mips32r3 -### -c %s \
226 // RUN: -mabs=legacy -mnan=2008 2>&1 \
227 // RUN: | FileCheck --check-prefix=CHECK-ABSLEGACYNAN2008 %s
228 // CHECK-ABSLEGACYNAN2008: "-target-feature" "+nan2008" "-target-feature" "-abs2008"
230 // -mnan=legacy
231 // RUN: %clang --target=mips-linux-gnu -march=mips32r3 -### -c %s \
232 // RUN: -mnan=2008 -mnan=legacy 2>&1 \
233 // RUN: | FileCheck --check-prefix=CHECK-NANLEGACY %s
234 // CHECK-NANLEGACY: "-target-feature" "-nan2008"
236 // -mabs=2008 on pre R2
237 // RUN: %clang --target=mips-linux-gnu -march=mips32 -### -c %s \
238 // RUN: -mabs=2008 2>&1 \
239 // RUN: | FileCheck --check-prefix=CHECK-ABSLEGACY %s
241 // -mabs=2008
242 // RUN: %clang --target=mips-linux-gnu -march=mips32r3 -### -c %s \
243 // RUN: -mabs=2008 2>&1 \
244 // RUN: | FileCheck --check-prefix=CHECK-ABS2008 %s
246 // -mabs=legacy
247 // RUN: %clang --target=mips-linux-gnu -march=mips32r3 -### -c %s \
248 // RUN: -mabs=legacy 2>&1 \
249 // RUN: | FileCheck --check-prefix=CHECK-ABSLEGACY %s
251 // -mabs=legacy on R6
252 // RUN: %clang --target=mips-linux-gnu -march=mips32r6 -### -c %s \
253 // RUN: -mabs=legacy 2>&1 \
254 // RUN: | FileCheck --check-prefix=CHECK-ABS2008 %s
256 // CHECK-ABSLEGACY: "-target-feature" "-abs2008"
257 // CHECK-ABSLEGACY-NOT: "-target-feature" "+abs2008"
258 // CHECK-ABS2008: "-target-feature" "+abs2008"
259 // CHECK-ABS2008-NOT: "-target-feature" "-abs2008"
261 // -mcompact-branches=never
262 // RUN: %clang --target=mips-linux-gnu -march=mips32r6 -### -c %s \
263 // RUN: -mcompact-branches=never 2>&1 \
264 // RUN: | FileCheck --check-prefix=CHECK-CBNEVER %s
265 // CHECK-CBNEVER: "-mllvm" "-mips-compact-branches=never"
267 // -mcompact-branches=optimal
268 // RUN: %clang --target=mips-linux-gnu -march=mips32r6 -### -c %s \
269 // RUN: -mcompact-branches=optimal 2>&1 \
270 // RUN: | FileCheck --check-prefix=CHECK-CBOPTIMAL %s
271 // CHECK-CBOPTIMAL: "-mllvm" "-mips-compact-branches=optimal"
273 // -mcompact-branches=always
274 // RUN: %clang --target=mips-linux-gnu -march=mips32r6 -### -c %s \
275 // RUN: -mcompact-branches=always 2>&1 \
276 // RUN: | FileCheck --check-prefix=CHECK-CBALWAYS %s
277 // CHECK-CBALWAYS: "-mllvm" "-mips-compact-branches=always"
279 // -mxgot
280 // RUN: %clang --target=mips-linux-gnu -### -c %s \
281 // RUN: -mno-xgot -mxgot 2>&1 \
282 // RUN: | FileCheck --check-prefix=CHECK-XGOT %s
283 // CHECK-XGOT: "-target-feature" "+xgot"
285 // -mno-xgot
286 // RUN: %clang --target=mips-linux-gnu -### -c %s \
287 // RUN: -mxgot -mno-xgot 2>&1 \
288 // RUN: | FileCheck --check-prefix=CHECK-NOXGOT %s
289 // CHECK-NOXGOT: "-target-feature" "-xgot"
291 // -mldc1-sdc1
292 // RUN: %clang --target=mips-linux-gnu -### -c %s \
293 // RUN: -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \
294 // RUN: | FileCheck --check-prefix=CHECK-LDC1SDC1 %s
295 // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1"
297 // -mno-ldc1-sdc1
298 // RUN: %clang --target=mips-linux-gnu -### -c %s \
299 // RUN: -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \
300 // RUN: | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s
301 // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1"
303 // -mcheck-zero-division
304 // RUN: %clang --target=mips-linux-gnu -### -c %s \
305 // RUN: -mno-check-zero-division -mcheck-zero-division 2>&1 \
306 // RUN: | FileCheck --check-prefix=CHECK-ZERODIV %s
307 // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division"
309 // -mno-check-zero-division
310 // RUN: %clang --target=mips-linux-gnu -### -c %s \
311 // RUN: -mcheck-zero-division -mno-check-zero-division 2>&1 \
312 // RUN: | FileCheck --check-prefix=CHECK-NOZERODIV %s
313 // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division"
315 // -G
316 // RUN: %clang --target=mips-linux-gnu -### -c %s \
317 // RUN: -G 16 2>&1 \
318 // RUN: | FileCheck --check-prefix=CHECK-MIPS-G %s
319 // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"
321 // -msoft-float (unknown vendor)
322 // RUN: %clang --target=mips-linux-gnu -### -c %s -msoft-float 2>&1 \
323 // RUN: | FileCheck --check-prefix=CHECK-SOFTFLOAT %s
324 // CHECK-SOFTFLOAT: "-target-feature" "+soft-float"
325 // CHECK-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
327 // -msoft-float -mfpxx (unknown vendor)
328 // RUN: %clang --target=mips-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
329 // RUN: | FileCheck --check-prefix=CHECK-SOFTFLOAT-FPXX %s
330 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
331 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
333 // -msoft-float (MTI)
334 // RUN: %clang --target=mips-mti-linux-gnu -### -c %s -msoft-float 2>&1 \
335 // RUN: | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT %s
336 // CHECK-MTI-SOFTFLOAT: "-target-feature" "+soft-float"
337 // CHECK-MTI-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
339 // -msoft-float -mfpxx (MTI)
340 // RUN: %clang --target=mips-mti-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
341 // RUN: | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT-FPXX %s
342 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
343 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
345 // -msoft-float (IMG)
346 // RUN: %clang --target=mips-img-linux-gnu -### -c %s -msoft-float 2>&1 \
347 // RUN: | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT %s
348 // CHECK-IMG-SOFTFLOAT: "-target-feature" "+soft-float"
349 // CHECK-IMG-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
351 // -msoft-float -mfpxx (IMG)
352 // RUN: %clang --target=mips-img-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
353 // RUN: | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT-FPXX %s
354 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
355 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
357 // -msingle-float (unknown vendor)
358 // RUN: %clang --target=mips-linux-gnu -### -c %s -msingle-float 2>&1 \
359 // RUN: | FileCheck --check-prefix=CHECK-SINGLEFLOAT %s
360 // CHECK-SINGLEFLOAT: "-target-feature" "+single-float"
361 // CHECK-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
363 // -msingle-float -mfpxx (unknown vendor)
364 // RUN: %clang --target=mips-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
365 // RUN: | FileCheck --check-prefix=CHECK-SINGLEFLOAT-FPXX %s
366 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
367 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
369 // -msingle-float (MTI)
370 // RUN: %clang --target=mips-mti-linux-gnu -### -c %s -msingle-float 2>&1 \
371 // RUN: | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT %s
372 // CHECK-MTI-SINGLEFLOAT: "-target-feature" "+single-float"
373 // CHECK-MTI-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
375 // -msingle-float -mfpxx (MTI)
376 // RUN: %clang --target=mips-mti-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
377 // RUN: | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT-FPXX %s
378 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
379 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
381 // -msingle-float (IMG)
382 // RUN: %clang --target=mips-img-linux-gnu -### -c %s -msingle-float 2>&1 \
383 // RUN: | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT %s
384 // CHECK-IMG-SINGLEFLOAT: "-target-feature" "+single-float"
385 // CHECK-IMG-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
387 // -msingle-float -mfpxx (IMG)
388 // RUN: %clang --target=mips-img-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
389 // RUN: | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT-FPXX %s
390 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
391 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
393 // -mlong-call
394 // RUN: %clang --target=mips-img-linux-gnu -### -c %s \
395 // RUN: -mno-abicalls -mlong-calls 2>&1 \
396 // RUN: | FileCheck --check-prefix=LONG-CALLS-ON %s
397 // RUN: %clang --target=mips-img-linux-gnu -### -c %s \
398 // RUN: -mno-abicalls -mno-long-calls 2>&1 \
399 // RUN: | FileCheck --check-prefix=LONG-CALLS-OFF %s
400 // RUN: %clang --target=mips-img-linux-gnu -### -c %s 2>&1 \
401 // RUN: | FileCheck --check-prefix=LONG-CALLS-DEF %s
402 // RUN: %clang --target=mips-img-linux-gnu -### -c %s -mlong-calls 2>&1 \
403 // RUN: | FileCheck --check-prefix=LONG-CALLS-DEF %s
404 // LONG-CALLS-ON: "-target-feature" "+long-calls"
405 // LONG-CALLS-OFF: "-target-feature" "-long-calls"
406 // LONG-CALLS-DEF-NOT: "long-calls"
408 // -mbranch-likely
409 // RUN: %clang --target=mips-mti-linux-gnu -### -c %s -mbranch-likely 2>&1 \
410 // RUN: | FileCheck --check-prefix=BRANCH-LIKELY %s
411 // BRANCH-LIKELY: argument unused during compilation: '-mbranch-likely'
413 // -mno-branch-likely
414 // RUN: %clang --target=mips-mti-linux-gnu -### -c %s -mno-branch-likely 2>&1 \
415 // RUN: | FileCheck --check-prefix=NO-BRANCH-LIKELY %s
416 // NO-BRANCH-LIKELY: argument unused during compilation: '-mno-branch-likely'
418 // -mindirect-jump=hazard
419 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
420 // RUN: -mindirect-jump=hazard 2>&1 \
421 // RUN: | FileCheck --check-prefix=INDIRECT-BH %s
422 // INDIRECT-BH: "-target-feature" "+use-indirect-jump-hazard"
424 // -mcrc
425 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
426 // RUN: -mno-crc -mcrc 2>&1 \
427 // RUN: | FileCheck --check-prefix=CHECK-CRC %s
428 // CHECK-CRC: "-target-feature" "+crc"
430 // -mno-crc
431 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
432 // RUN: -mcrc -mno-crc 2>&1 \
433 // RUN: | FileCheck --check-prefix=CHECK-NO-CRC %s
434 // CHECK-NO-CRC: "-target-feature" "-crc"
436 // -mvirt
437 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
438 // RUN: -mno-virt -mvirt 2>&1 \
439 // RUN: | FileCheck --check-prefix=CHECK-VIRT %s
440 // CHECK-VIRT: "-target-feature" "+virt"
442 // -mno-virt
443 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
444 // RUN: -mvirt -mno-virt 2>&1 \
445 // RUN: | FileCheck --check-prefix=CHECK-NO-VIRT %s
446 // CHECK-NO-VIRT: "-target-feature" "-virt"
448 // -mginv
449 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
450 // RUN: -mno-ginv -mginv 2>&1 \
451 // RUN: | FileCheck --check-prefix=CHECK-GINV %s
452 // CHECK-GINV: "-target-feature" "+ginv"
454 // -mno-ginv
455 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
456 // RUN: -mginv -mno-ginv 2>&1 \
457 // RUN: | FileCheck --check-prefix=CHECK-NO-GINV %s
458 // CHECK-NO-GINV: "-target-feature" "-ginv"
460 // -mrelax-pic-calls
461 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
462 // RUN: -mno-relax-pic-calls -mrelax-pic-calls 2>&1 \
463 // RUN: | FileCheck --check-prefix=CHECK-RELAX-PIC-CALLS %s
464 // CHECK-RELAX-PIC-CALLS-NOT: "-mllvm" "-mips-jalr-reloc=0"
466 // -mno-relax-pic-calls
467 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
468 // RUN: -mrelax-pic-calls -mno-relax-pic-calls 2>&1 \
469 // RUN: | FileCheck --check-prefix=CHECK-NO-RELAX-PIC-CALLS %s
470 // CHECK-NO-RELAX-PIC-CALLS: "-mllvm" "-mips-jalr-reloc=0"
472 // -mno-unaligned-access
473 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
474 // RUN: -munaligned-access -mno-strict-align \
475 // RUN: -mno-unaligned-access 2>&1 \
476 // RUN: | FileCheck --check-prefix=CHECK-STRICT-ALIGN %s
477 // CHECK-STRICT-ALIGN: "-target-feature" "+strict-align"
479 // -munaligned-access
480 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
481 // RUN: -mno-unaligned-access -mstrict-align \
482 // RUN: -munaligned-access 2>&1 \
483 // RUN: | FileCheck --check-prefix=CHECK-NO-STRICT-ALIGN %s
484 // CHECK-NO-STRICT-ALIGN: "-target-feature" "-strict-align"
486 // -mstrict-align
487 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
488 // RUN: -munaligned-access -mno-strict-align \
489 // RUN: -mstrict-align 2>&1 \
490 // RUN: | FileCheck --check-prefix=CHECK-STRICT-ALIGN %s
492 // -mno-strict-align
493 // RUN: %clang --target=mips-unknown-linux-gnu -### -c %s \
494 // RUN: -mno-unaligned-access -mstrict-align \
495 // RUN: -mno-strict-align 2>&1 \
496 // RUN: | FileCheck --check-prefix=CHECK-NO-STRICT-ALIGN %s