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"
12 //
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"
17 //
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"
22 //
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"
27 //
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"
32 //
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"
37 //
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"
42 //
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"
47 //
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"
52 //
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"
57 //
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"
62 //
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"
67 //
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"
72 //
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"
77 //
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"
82 //
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"
87 //
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"
93 //
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"
99 //
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
105 //
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"
111 //
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"
117 //
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"
123 //
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"
129 //
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"
135 //
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"
141 //
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"
147 //
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"
153 //
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"
159 //
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"
165 //
166 // -mmt
167 // RUN: %clang -target mips-linux-gnu -### -c %s \
168 // RUN:     -mno-mt -mmt 2>&1 \
169 // RUN:   | FileCheck --check-prefix=CHECK-MMT %s
170 // CHECK-MMT: "-target-feature" "+mt"
171 //
172 // -mno-mt
173 // RUN: %clang -target mips-linux-gnu -### -c %s \
174 // RUN:     -mmt -mno-mt 2>&1 \
175 // RUN:   | FileCheck --check-prefix=CHECK-NOMMT %s
176 // CHECK-NOMMT: "-target-feature" "-mt"
177 //
178 // -modd-spreg
179 // RUN: %clang -target mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \
180 // RUN:   | FileCheck --check-prefix=CHECK-MODDSPREG %s
181 // CHECK-MODDSPREG: "-target-feature" "-nooddspreg"
182 //
183 // -mno-odd-spreg
184 // RUN: %clang -target mips-linux-gnu -### -c %s -modd-spreg -mno-odd-spreg 2>&1 \
185 // RUN:   | FileCheck --check-prefix=CHECK-NOMODDSPREG %s
186 // CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg"
187 //
188 // -mfpxx
189 // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx 2>&1 \
190 // RUN:   | FileCheck --check-prefix=CHECK-MFPXX %s
191 // CHECK-MFPXX: "-target-feature" "+fpxx"
192 // CHECK-MFPXX: "-target-feature" "+nooddspreg"
193 //
194 // -mfpxx -modd-spreg
195 // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx -modd-spreg 2>&1 \
196 // RUN:   | FileCheck --check-prefix=CHECK-MFPXX-ODDSPREG %s
197 // CHECK-MFPXX-ODDSPREG: "-target-feature" "+fpxx"
198 // CHECK-MFPXX-ODDSPREG: "-target-feature" "-nooddspreg"
199 //
200 // -mfp64
201 // RUN: %clang -target mips-linux-gnu -### -c %s \
202 // RUN:     -mfp32 -mfp64 2>&1 \
203 // RUN:   | FileCheck --check-prefix=CHECK-MFP64 %s
204 // CHECK-MFP64: "-target-feature" "+fp64"
205 //
206 // -mfp32
207 // RUN: %clang -target mips-linux-gnu -### -c %s \
208 // RUN:     -mfp64 -mfp32 2>&1 \
209 // RUN:   | FileCheck --check-prefix=CHECK-NOMFP64 %s
210 // CHECK-NOMFP64: "-target-feature" "-fp64"
211 //
212 // -mnan=2008
213 // RUN: %clang -target mips-linux-gnu -march=mips32r3 -### -c %s \
214 // RUN:     -mnan=legacy -mnan=2008 2>&1 \
215 // RUN:   | FileCheck --check-prefix=CHECK-NAN2008 %s
216 // CHECK-NAN2008: "-target-feature" "+nan2008"
217 //
218 // -mnan=legacy
219 // RUN: %clang -target mips-linux-gnu -march=mips32r3 -### -c %s \
220 // RUN:     -mnan=2008 -mnan=legacy 2>&1 \
221 // RUN:   | FileCheck --check-prefix=CHECK-NANLEGACY %s
222 // CHECK-NANLEGACY: "-target-feature" "-nan2008"
223 //
224 // -mabs=2008 on pre R2
225 // RUN: %clang -target mips-linux-gnu -march=mips32 -### -c %s \
226 // RUN:     -mabs=2008 2>&1 \
227 // RUN:   | FileCheck --check-prefix=CHECK-ABSLEGACY %s
228 //
229 // -mabs=2008
230 // RUN: %clang -target mips-linux-gnu -march=mips32r3 -### -c %s \
231 // RUN:     -mabs=2008 2>&1 \
232 // RUN:   | FileCheck --check-prefix=CHECK-ABS2008 %s
233 //
234 // -mabs=legacy
235 // RUN: %clang -target mips-linux-gnu -march=mips32r3 -### -c %s \
236 // RUN:     -mabs=legacy 2>&1 \
237 // RUN:   | FileCheck --check-prefix=CHECK-ABSLEGACY %s
238 //
239 // -mabs=legacy on R6
240 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -c %s \
241 // RUN:     -mabs=legacy 2>&1 \
242 // RUN:   | FileCheck --check-prefix=CHECK-ABS2008 %s
243 //
244 // CHECK-ABSLEGACY: "-target-feature" "-abs2008"
245 // CHECK-ABSLEGACY-NOT: "-target-feature" "+abs2008"
246 // CHECK-ABS2008: "-target-feature" "+abs2008"
247 // CHECK-ABS2008-NOT: "-target-feature" "-abs2008"
248 //
249 // -mcompact-branches=never
250 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -c %s \
251 // RUN:     -mcompact-branches=never 2>&1 \
252 // RUN:   | FileCheck --check-prefix=CHECK-CBNEVER %s
253 // CHECK-CBNEVER: "-mllvm" "-mips-compact-branches=never"
254 //
255 // -mcompact-branches=optimal
256 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -c %s \
257 // RUN:     -mcompact-branches=optimal 2>&1 \
258 // RUN:   | FileCheck --check-prefix=CHECK-CBOPTIMAL %s
259 // CHECK-CBOPTIMAL: "-mllvm" "-mips-compact-branches=optimal"
260 //
261 // -mcompact-branches=always
262 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -c %s \
263 // RUN:     -mcompact-branches=always 2>&1 \
264 // RUN:   | FileCheck --check-prefix=CHECK-CBALWAYS %s
265 // CHECK-CBALWAYS: "-mllvm" "-mips-compact-branches=always"
266 //
267 // -mxgot
268 // RUN: %clang -target mips-linux-gnu -### -c %s \
269 // RUN:     -mno-xgot -mxgot 2>&1 \
270 // RUN:   | FileCheck --check-prefix=CHECK-XGOT %s
271 // CHECK-XGOT: "-target-feature" "+xgot"
272 //
273 // -mno-xgot
274 // RUN: %clang -target mips-linux-gnu -### -c %s \
275 // RUN:     -mxgot -mno-xgot 2>&1 \
276 // RUN:   | FileCheck --check-prefix=CHECK-NOXGOT %s
277 // CHECK-NOXGOT: "-target-feature" "-xgot"
278 //
279 // -mldc1-sdc1
280 // RUN: %clang -target mips-linux-gnu -### -c %s \
281 // RUN:     -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \
282 // RUN:   | FileCheck --check-prefix=CHECK-LDC1SDC1 %s
283 // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1"
284 //
285 // -mno-ldc1-sdc1
286 // RUN: %clang -target mips-linux-gnu -### -c %s \
287 // RUN:     -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \
288 // RUN:   | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s
289 // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1"
290 //
291 // -mcheck-zero-division
292 // RUN: %clang -target mips-linux-gnu -### -c %s \
293 // RUN:     -mno-check-zero-division -mcheck-zero-division 2>&1 \
294 // RUN:   | FileCheck --check-prefix=CHECK-ZERODIV %s
295 // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division"
296 //
297 // -mno-check-zero-division
298 // RUN: %clang -target mips-linux-gnu -### -c %s \
299 // RUN:     -mcheck-zero-division -mno-check-zero-division 2>&1 \
300 // RUN:   | FileCheck --check-prefix=CHECK-NOZERODIV %s
301 // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division"
302 //
303 // -G
304 // RUN: %clang -target mips-linux-gnu -### -c %s \
305 // RUN:     -G 16 2>&1 \
306 // RUN:   | FileCheck --check-prefix=CHECK-MIPS-G %s
307 // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"
308 //
309 // -msoft-float (unknown vendor)
310 // RUN: %clang -target mips-linux-gnu -### -c %s -msoft-float 2>&1 \
311 // RUN:   | FileCheck --check-prefix=CHECK-SOFTFLOAT %s
312 // CHECK-SOFTFLOAT: "-target-feature" "+soft-float"
313 // CHECK-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
314 //
315 // -msoft-float -mfpxx (unknown vendor)
316 // RUN: %clang -target mips-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
317 // RUN:   | FileCheck --check-prefix=CHECK-SOFTFLOAT-FPXX %s
318 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
319 // CHECK-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
320 //
321 // -msoft-float (MTI)
322 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msoft-float 2>&1 \
323 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT %s
324 // CHECK-MTI-SOFTFLOAT: "-target-feature" "+soft-float"
325 // CHECK-MTI-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
326 //
327 // -msoft-float -mfpxx (MTI)
328 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
329 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SOFTFLOAT-FPXX %s
330 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
331 // CHECK-MTI-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
332 //
333 // -msoft-float (IMG)
334 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msoft-float 2>&1 \
335 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT %s
336 // CHECK-IMG-SOFTFLOAT: "-target-feature" "+soft-float"
337 // CHECK-IMG-SOFTFLOAT-NOT: "-target-feature" "+fpxx"
338 //
339 // -msoft-float -mfpxx (IMG)
340 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msoft-float -mfpxx 2>&1 \
341 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SOFTFLOAT-FPXX %s
342 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+soft-float"
343 // CHECK-IMG-SOFTFLOAT-FPXX: "-target-feature" "+fpxx"
344 //
345 // -msingle-float (unknown vendor)
346 // RUN: %clang -target mips-linux-gnu -### -c %s -msingle-float 2>&1 \
347 // RUN:   | FileCheck --check-prefix=CHECK-SINGLEFLOAT %s
348 // CHECK-SINGLEFLOAT: "-target-feature" "+single-float"
349 // CHECK-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
350 //
351 // -msingle-float -mfpxx (unknown vendor)
352 // RUN: %clang -target mips-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
353 // RUN:   | FileCheck --check-prefix=CHECK-SINGLEFLOAT-FPXX %s
354 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
355 // CHECK-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
356 //
357 // -msingle-float (MTI)
358 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msingle-float 2>&1 \
359 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT %s
360 // CHECK-MTI-SINGLEFLOAT: "-target-feature" "+single-float"
361 // CHECK-MTI-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
362 //
363 // -msingle-float -mfpxx (MTI)
364 // RUN: %clang -target mips-mti-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
365 // RUN:   | FileCheck --check-prefix=CHECK-MTI-SINGLEFLOAT-FPXX %s
366 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
367 // CHECK-MTI-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
368 //
369 // -msingle-float (IMG)
370 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msingle-float 2>&1 \
371 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT %s
372 // CHECK-IMG-SINGLEFLOAT: "-target-feature" "+single-float"
373 // CHECK-IMG-SINGLEFLOAT-NOT: "-target-feature" "+fpxx"
374 //
375 // -msingle-float -mfpxx (IMG)
376 // RUN: %clang -target mips-img-linux-gnu -### -c %s -msingle-float -mfpxx 2>&1 \
377 // RUN:   | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT-FPXX %s
378 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
379 // CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
380 
381 // -mlong-call
382 // RUN: %clang -target mips-img-linux-gnu -### -c %s \
383 // RUN:        -mno-abicalls -mlong-calls 2>&1 \
384 // RUN:   | FileCheck --check-prefix=LONG-CALLS-ON %s
385 // RUN: %clang -target mips-img-linux-gnu -### -c %s \
386 // RUN:        -mno-abicalls -mno-long-calls 2>&1 \
387 // RUN:   | FileCheck --check-prefix=LONG-CALLS-OFF %s
388 // RUN: %clang -target mips-img-linux-gnu -### -c %s 2>&1 \
389 // RUN:   | FileCheck --check-prefix=LONG-CALLS-DEF %s
390 // RUN: %clang -target mips-img-linux-gnu -### -c %s -mlong-calls 2>&1 \
391 // RUN:   | FileCheck --check-prefix=LONG-CALLS-DEF %s
392 // LONG-CALLS-ON: "-target-feature" "+long-calls"
393 // LONG-CALLS-OFF: "-target-feature" "-long-calls"
394 // LONG-CALLS-DEF-NOT: "long-calls"
395 //
396 // -mbranch-likely
397 // RUN: %clang -target -mips-mti-linux-gnu -### -c %s -mbranch-likely 2>&1 \
398 // RUN:   | FileCheck --check-prefix=BRANCH-LIKELY %s
399 // BRANCH-LIKELY: argument unused during compilation: '-mbranch-likely'
400 //
401 // -mno-branch-likely
402 // RUN: %clang -target -mips-mti-linux-gnu -### -c %s -mno-branch-likely 2>&1 \
403 // RUN:   | FileCheck --check-prefix=NO-BRANCH-LIKELY %s
404 // NO-BRANCH-LIKELY: argument unused during compilation: '-mno-branch-likely'
405 
406 // -mindirect-jump=hazard
407 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
408 // RUN:        -mindirect-jump=hazard 2>&1 \
409 // RUN:   | FileCheck --check-prefix=INDIRECT-BH %s
410 // INDIRECT-BH: "-target-feature" "+use-indirect-jump-hazard"
411 //
412 // -mcrc
413 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
414 // RUN:     -mno-crc -mcrc 2>&1 \
415 // RUN:   | FileCheck --check-prefix=CHECK-CRC %s
416 // CHECK-CRC: "-target-feature" "+crc"
417 //
418 // -mno-crc
419 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
420 // RUN:     -mcrc -mno-crc 2>&1 \
421 // RUN:   | FileCheck --check-prefix=CHECK-NO-CRC %s
422 // CHECK-NO-CRC: "-target-feature" "-crc"
423 //
424 // -mvirt
425 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
426 // RUN:     -mno-virt -mvirt 2>&1 \
427 // RUN:   | FileCheck --check-prefix=CHECK-VIRT %s
428 // CHECK-VIRT: "-target-feature" "+virt"
429 //
430 // -mno-virt
431 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
432 // RUN:     -mvirt -mno-virt 2>&1 \
433 // RUN:   | FileCheck --check-prefix=CHECK-NO-VIRT %s
434 // CHECK-NO-VIRT: "-target-feature" "-virt"
435 //
436 // -mginv
437 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
438 // RUN:     -mno-ginv -mginv 2>&1 \
439 // RUN:   | FileCheck --check-prefix=CHECK-GINV %s
440 // CHECK-GINV: "-target-feature" "+ginv"
441 //
442 // -mno-ginv
443 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
444 // RUN:     -mginv -mno-ginv 2>&1 \
445 // RUN:   | FileCheck --check-prefix=CHECK-NO-GINV %s
446 // CHECK-NO-GINV: "-target-feature" "-ginv"
447 //
448 // -mrelax-pic-calls
449 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
450 // RUN:     -mno-relax-pic-calls -mrelax-pic-calls 2>&1 \
451 // RUN:   | FileCheck --check-prefix=CHECK-RELAX-PIC-CALLS %s
452 // CHECK-RELAX-PIC-CALLS-NOT: "-mllvm" "-mips-jalr-reloc=0"
453 //
454 // -mno-relax-pic-calls
455 // RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
456 // RUN:     -mrelax-pic-calls -mno-relax-pic-calls 2>&1 \
457 // RUN:   | FileCheck --check-prefix=CHECK-NO-RELAX-PIC-CALLS %s
458 // CHECK-NO-RELAX-PIC-CALLS: "-mllvm" "-mips-jalr-reloc=0"
459