[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / mips-integrated-as.s
blobe248ba7f77e9143704ed4667520c6b34e1df1e20
1 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
2 // RUN: FileCheck -check-prefix=ABI-O32 %s
3 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=32 2>&1 | \
4 // RUN: FileCheck -check-prefix=ABI-O32 %s
5 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=o32 2>&1 | \
6 // RUN: FileCheck -check-prefix=ABI-O32 %s
7 // ABI-O32: -cc1as
8 // ABI-O32: "-target-abi" "o32"
10 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=eabi 2>&1 | \
11 // RUN: FileCheck -check-prefix=ABI-EABI32 %s
12 // ABI-EABI32: -cc1as
13 // ABI-EABI32: "-target-abi" "eabi"
15 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n32 2>&1 | \
16 // RUN: FileCheck -check-prefix=ABI-N32 %s
17 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mabi=n32 2>&1 | \
18 // RUN: FileCheck -check-prefix=ABI-N32 %s
19 // ABI-N32: -cc1as
20 // ABI-N32: "-target-abi" "n32"
22 // FIXME: We should also test '-target mips-linux-gnu -mips64' defaults to the
23 // default 64-bit ABI (N64 but GCC uses N32). It currently selects O32
24 // because of the triple.
25 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 2>&1 | \
26 // RUN: FileCheck -check-prefix=ABI-N64 %s
28 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \
29 // RUN: FileCheck -check-prefix=ABI-N64 %s
30 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \
31 // RUN: FileCheck -check-prefix=ABI-N64 %s
32 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \
33 // RUN: FileCheck -check-prefix=ABI-N64 %s
34 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \
35 // RUN: FileCheck -check-prefix=ABI-N64 %s
36 // ABI-N64: -cc1as
37 // ABI-N64: "-target-abi" "n64"
39 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msoft-float 2>&1 | \
40 // RUN: FileCheck -check-prefix=SOFTFLOAT %s
41 // SOFTFLOAT: -cc1as
42 // SOFTFLOAT: "-target-feature" "+soft-float"
44 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
45 // RUN: FileCheck -check-prefix=HARDFLOAT %s
46 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mhard-float 2>&1 | \
47 // RUN: FileCheck -check-prefix=HARDFLOAT %s
48 // HARDFLOAT: -cc1as
49 // HARDFLOAT-NOT: "-target-feature" "+soft-float"
51 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
52 // RUN: FileCheck -check-prefix=NAN-DEFAULT %s
53 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips32r6 2>&1 | \
54 // RUN: FileCheck -check-prefix=NAN-DEFAULT %s
55 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64r6 2>&1 | \
56 // RUN: FileCheck -check-prefix=NAN-DEFAULT %s
57 // NAN-DEFAULT: -cc1as
58 // NAN-DEFAULT-NOT: "-target-feature" "{{[-+]}}nan2008"
60 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mnan=legacy 2>&1 | \
61 // RUN: FileCheck -check-prefix=NAN-LEGACY %s
62 // NAN-LEGACY: -cc1as
63 // NAN-LEGACY: "-target-feature" "-nan2008"
65 // RUN: %clang -target mips-linux-gnu -march=mips32r6 -### -fintegrated-as -c %s -mnan=2008 2>&1 | \
66 // RUN: FileCheck -check-prefix=NAN-2008 %s
67 // NAN-2008: -cc1as
68 // NAN-2008: "-target-feature" "+nan2008"
70 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
71 // RUN: FileCheck -check-prefix=DEFAULT-FLOAT %s
72 // DEFAULT-FLOAT: -cc1as
73 // DEFAULT-FLOAT-NOT: "-target-feature" "{{[+-]}}single-float"
75 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msingle-float 2>&1 | \
76 // RUN: FileCheck -check-prefix=SINGLE-FLOAT %s
77 // SINGLE-FLOAT: -cc1as
78 // SINGLE-FLOAT: "-target-feature" "+single-float"
80 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdouble-float 2>&1 | \
81 // RUN: FileCheck -check-prefix=DOUBLE-FLOAT %s
82 // DOUBLE-FLOAT: -cc1as
83 // DOUBLE-FLOAT: "-target-feature" "-single-float"
85 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
86 // RUN: FileCheck -check-prefix=MIPS16-DEFAULT %s
87 // MIPS16-DEFAULT: -cc1as
88 // MIPS16-DEFAULT-NOT: "-target-feature" "{{[+-]}}mips16"
90 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips16 2>&1 | \
91 // RUN: FileCheck -check-prefix=MIPS16-ON %s
92 // MIPS16-ON: -cc1as
93 // MIPS16-ON: "-target-feature" "+mips16"
95 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-mips16 2>&1 | \
96 // RUN: FileCheck -check-prefix=MIPS16-OFF %s
97 // MIPS16-OFF: -cc1as
98 // MIPS16-OFF: "-target-feature" "-mips16"
100 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
101 // RUN: FileCheck -check-prefix=MICROMIPS-DEFAULT %s
102 // MICROMIPS-DEFAULT: -cc1as
103 // MICROMIPS-DEFAULT-NOT: "-target-feature" "{{[+-]}}micromips"
105 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmicromips 2>&1 | \
106 // RUN: FileCheck -check-prefix=MICROMIPS-ON %s
107 // MICROMIPS-ON: -cc1as
108 // MICROMIPS-ON: "-target-feature" "+micromips"
110 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-micromips 2>&1 | \
111 // RUN: FileCheck -check-prefix=MICROMIPS-OFF %s
112 // MICROMIPS-OFF: -cc1as
113 // MICROMIPS-OFF: "-target-feature" "-micromips"
115 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
116 // RUN: FileCheck -check-prefix=DSP-DEFAULT %s
117 // DSP-DEFAULT: -cc1as
118 // DSP-DEFAULT-NOT: "-target-feature" "{{[+-]}}dsp"
120 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdsp 2>&1 | \
121 // RUN: FileCheck -check-prefix=DSP-ON %s
122 // DSP-ON: -cc1as
123 // DSP-ON: "-target-feature" "+dsp"
125 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dsp 2>&1 | \
126 // RUN: FileCheck -check-prefix=DSP-OFF %s
127 // DSP-OFF: -cc1as
128 // DSP-OFF: "-target-feature" "-dsp"
130 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
131 // RUN: FileCheck -check-prefix=DSPR2-DEFAULT %s
132 // DSPR2-DEFAULT: -cc1as
133 // DSPR2-DEFAULT-NOT: "-target-feature" "{{[+-]}}dspr2"
135 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdspr2 2>&1 | \
136 // RUN: FileCheck -check-prefix=DSPR2-ON %s
137 // DSPR2-ON: -cc1as
138 // DSPR2-ON: "-target-feature" "+dspr2"
140 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dspr2 2>&1 | \
141 // RUN: FileCheck -check-prefix=DSPR2-OFF %s
142 // DSPR2-OFF: -cc1as
143 // DSPR2-OFF: "-target-feature" "-dspr2"
145 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
146 // RUN: FileCheck -check-prefix=MSA-DEFAULT %s
147 // MSA-DEFAULT: -cc1as
148 // MSA-DEFAULT-NOT: "-target-feature" "{{[+-]}}msa"
150 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmsa 2>&1 | \
151 // RUN: FileCheck -check-prefix=MSA-ON %s
152 // MSA-ON: -cc1as
153 // MSA-ON: "-target-feature" "+msa"
155 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-msa 2>&1 | \
156 // RUN: FileCheck -check-prefix=MSA-OFF %s
157 // MSA-OFF: -cc1as
158 // MSA-OFF: "-target-feature" "-msa"
160 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
161 // RUN: FileCheck -check-prefix=FPXX-DEFAULT %s
162 // FPXX-DEFAULT: -cc1as
163 // FPXX-DEFAULT: "-target-feature" "+fpxx"
164 // FPXX-DEFAULT: "-target-feature" "+nooddspreg"
166 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp32 2>&1 | \
167 // RUN: FileCheck -check-prefix=FP32 %s
168 // FP32: -cc1as
169 // FP32: "-target-feature" "-fp64"
171 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx 2>&1 | \
172 // RUN: FileCheck -check-prefix=FPXX %s
173 // FPXX: -cc1as
174 // FPXX: "-target-feature" "+fpxx"
175 // FPXX: "-target-feature" "+nooddspreg"
177 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp64 2>&1 | \
178 // RUN: FileCheck -check-prefix=FP64 %s
179 // FP64: -cc1as
180 // FP64: "-target-feature" "+fp64"
182 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
183 // RUN: FileCheck -check-prefix=ODDSPREG-DEFAULT %s
184 // ODDSPREG-DEFAULT: -cc1as
185 // ODDSPREG-DEFAULT: "-target-feature" "+nooddspreg"
187 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -modd-spreg 2>&1 | \
188 // RUN: FileCheck -check-prefix=ODDSPREG-ON %s
189 // ODDSPREG-ON: -cc1as
190 // ODDSPREG-ON: "-target-feature" "-nooddspreg"
192 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-odd-spreg 2>&1 | \
193 // RUN: FileCheck -check-prefix=ODDSPREG-OFF %s
194 // ODDSPREG-OFF: -cc1as
195 // ODDSPREG-OFF: "-target-feature" "+nooddspreg"
197 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx -modd-spreg 2>&1 | \
198 // RUN: FileCheck -check-prefix=FPXX-ODDSPREG %s
199 // FPXX-ODDSPREG: -cc1as
200 // FPXX-ODDSPREG: "-target-feature" "+fpxx"
201 // FPXX-ODDSPREG: "-target-feature" "-nooddspreg"
203 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabicalls 2>&1 | \
204 // RUN: FileCheck -check-prefix=ABICALLS-ON %s
205 // ABICALLS-ON: -cc1as
206 // ABICALLS-ON: "-target-feature" "-noabicalls"
208 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-abicalls 2>&1 | \
209 // RUN: FileCheck -check-prefix=ABICALLS-OFF %s
210 // ABICALLS-OFF: -cc1as
211 // ABICALLS-OFF: "-target-feature" "+noabicalls"
213 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -msoft-float -c %s 2>&1 | \
214 // RUN: FileCheck -check-prefix=SOFTFLOAT-IMPLICIT-FPXX --implicit-check-not=-mfpxx %s
215 // SOFTFLOAT-IMPLICIT-FPXX: -cc1as
216 // SOFTFLOAT-IMPLICIT-FPXX: "-target-feature" "+soft-float"
217 // SOFTFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+fpxx"
218 // SOFTFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+nooddspreg"
220 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -msoft-float -mfpxx -c %s 2>&1 | \
221 // RUN: FileCheck -check-prefix=SOFTFLOAT-EXPLICIT-FPXX %s
222 // SOFTFLOAT-EXPLICIT-FPXX: -cc1as
223 // SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+soft-float"
224 // SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+fpxx"
225 // SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+nooddspreg"
227 // RUN: %clang -target mips-mti-linux-gnu -### -fintegrated-as -msoft-float -c %s 2>&1 | \
228 // RUN: FileCheck -check-prefix=MTI-SOFTFLOAT-IMPLICIT-FPXX --implicit-check-not=-mfpxx %s
229 // MTI-SOFTFLOAT-IMPLICIT-FPXX: -cc1as
230 // MTI-SOFTFLOAT-IMPLICIT-FPXX: "-target-feature" "+soft-float"
231 // MTI-SOFTFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+fpxx"
232 // MTI-SOFTFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+nooddspreg"
234 // RUN: %clang -target mips-mti-linux-gnu -### -fintegrated-as -msoft-float -mfpxx -c %s 2>&1 | \
235 // RUN: FileCheck -check-prefix=MTI-SOFTFLOAT-EXPLICIT-FPXX %s
236 // MTI-SOFTFLOAT-EXPLICIT-FPXX: -cc1as
237 // MTI-SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+soft-float"
238 // MTI-SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+fpxx"
239 // MTI-SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+nooddspreg"
241 // RUN: %clang -target mips-img-linux-gnu -### -fintegrated-as -msoft-float -c %s 2>&1 | \
242 // RUN: FileCheck -check-prefix=IMG-SOFTFLOAT-IMPLICIT-FPXX --implicit-check-not=-mfpxx %s
243 // IMG-SOFTFLOAT-IMPLICIT-FPXX: -cc1as
244 // IMG-SOFTFLOAT-IMPLICIT-FPXX: "-target-feature" "+soft-float"
245 // IMG-SOFTFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+fpxx"
246 // IMG-SOFTFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+nooddspreg"
248 // RUN: %clang -target mips-img-linux-gnu -### -fintegrated-as -msoft-float -mfpxx -c %s 2>&1 | \
249 // RUN: FileCheck -check-prefix=IMG-SOFTFLOAT-EXPLICIT-FPXX %s
250 // IMG-SOFTFLOAT-EXPLICIT-FPXX: -cc1as
251 // IMG-SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+soft-float"
252 // IMG-SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+fpxx"
253 // IMG-SOFTFLOAT-EXPLICIT-FPXX: "-target-feature" "+nooddspreg"
255 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -msingle-float -c %s 2>&1 | \
256 // RUN: FileCheck -check-prefix=SINGLEFLOAT-IMPLICIT-FPXX --implicit-check-not=-mfpxx %s
257 // SINGLEFLOAT-IMPLICIT-FPXX: -cc1as
258 // SINGLEFLOAT-IMPLICIT-FPXX: "-target-feature" "+single-float"
259 // SINGLEFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+fpxx"
260 // SINGLEFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+nooddspreg"
262 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -msingle-float -mfpxx -c %s 2>&1 | \
263 // RUN: FileCheck -check-prefix=SINGLEFLOAT-EXPLICIT-FPXX %s
264 // SINGLEFLOAT-EXPLICIT-FPXX: -cc1as
265 // SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+single-float"
266 // SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+fpxx"
267 // SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+nooddspreg"
269 // RUN: %clang -target mips-mti-linux-gnu -### -fintegrated-as -msingle-float -c %s 2>&1 | \
270 // RUN: FileCheck -check-prefix=MTI-SINGLEFLOAT-IMPLICIT-FPXX --implicit-check-not=-mfpxx %s
271 // MTI-SINGLEFLOAT-IMPLICIT-FPXX: -cc1as
272 // MTI-SINGLEFLOAT-IMPLICIT-FPXX: "-target-feature" "+single-float"
273 // MTI-SINGLEFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+fpxx"
274 // MTI-SINGLEFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+nooddspreg"
276 // RUN: %clang -target mips-mti-linux-gnu -### -fintegrated-as -msingle-float -mfpxx -c %s 2>&1 | \
277 // RUN: FileCheck -check-prefix=MTI-SINGLEFLOAT-EXPLICIT-FPXX %s
278 // MTI-SINGLEFLOAT-EXPLICIT-FPXX: -cc1as
279 // MTI-SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+single-float"
280 // MTI-SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+fpxx"
281 // MTI-SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+nooddspreg"
283 // RUN: %clang -target mips-img-linux-gnu -### -fintegrated-as -msingle-float -c %s 2>&1 | \
284 // RUN: FileCheck -check-prefix=IMG-SINGLEFLOAT-IMPLICIT-FPXX --implicit-check-not=-mfpxx %s
285 // IMG-SINGLEFLOAT-IMPLICIT-FPXX: -cc1as
286 // IMG-SINGLEFLOAT-IMPLICIT-FPXX: "-target-feature" "+single-float"
287 // IMG-SINGLEFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+fpxx"
288 // IMG-SINGLEFLOAT-IMPLICIT-FPXX-NOT: "-target-feature" "+nooddspreg"
290 // RUN: %clang -target mips-img-linux-gnu -### -fintegrated-as -msingle-float -mfpxx -c %s 2>&1 | \
291 // RUN: FileCheck -check-prefix=IMG-SINGLEFLOAT-EXPLICIT-FPXX %s
292 // IMG-SINGLEFLOAT-EXPLICIT-FPXX: -cc1as
293 // IMG-SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+single-float"
294 // IMG-SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+fpxx"
295 // IMG-SINGLEFLOAT-EXPLICIT-FPXX: "-target-feature" "+nooddspreg"
297 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -mxgot -c %s 2>&1 | \
298 // RUN: FileCheck -check-prefix=XGOT %s
299 // XGOT: -cc1as
300 // XGOT: "-target-feature" "+xgot"
302 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -mno-xgot -c %s 2>&1 | \
303 // RUN: FileCheck -check-prefix=NOXGOT %s
304 // NOXGOT: -cc1as
305 // NOXGOT: "-target-feature" "-xgot"