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
8 // ABI-O32: "-target-feature" "-n64"
9 // ABI-O32: "-target-feature" "+o32"
11 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=eabi 2>&1 | \
12 // RUN: FileCheck -check-prefix=ABI-EABI32 %s
14 // ABI-EABI32: "-target-feature" "-o32"
15 // ABI-EABI32: "-target-feature" "-n64"
16 // ABI-EABI32: "-target-feature" "+eabi"
18 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n32 2>&1 | \
19 // RUN: FileCheck -check-prefix=ABI-N32 %s
20 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mabi=n32 2>&1 | \
21 // RUN: FileCheck -check-prefix=ABI-N32 %s
23 // ABI-N32: "-target-feature" "-o32"
24 // ABI-N32: "-target-feature" "-n64"
25 // ABI-N32: "-target-feature" "+n32"
27 // FIXME: We should also test '-target mips-linux-gnu -mips64' defaults to the
28 // default 64-bit ABI (N64 but GCC uses N32). It currently selects O32
29 // because of the triple.
30 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 2>&1 | \
31 // RUN: FileCheck -check-prefix=ABI-N64 %s
33 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \
34 // RUN: FileCheck -check-prefix=ABI-N64 %s
35 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \
36 // RUN: FileCheck -check-prefix=ABI-N64 %s
37 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \
38 // RUN: FileCheck -check-prefix=ABI-N64 %s
39 // RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \
40 // RUN: FileCheck -check-prefix=ABI-N64 %s
42 // ABI-N64: "-target-feature" "-o32"
43 // ABI-N64: "-target-feature" "+n64"
45 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msoft-float 2>&1 | \
46 // RUN: FileCheck -check-prefix=SOFTFLOAT %s
48 // SOFTFLOAT: "-target-feature" "+soft-float"
50 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
51 // RUN: FileCheck -check-prefix=HARDFLOAT %s
52 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mhard-float 2>&1 | \
53 // RUN: FileCheck -check-prefix=HARDFLOAT %s
55 // HARDFLOAT-NOT: "-target-feature" "+soft-float"
57 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
58 // RUN: FileCheck -check-prefix=NAN-DEFAULT %s
59 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips32r6 2>&1 | \
60 // RUN: FileCheck -check-prefix=NAN-DEFAULT %s
61 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64r6 2>&1 | \
62 // RUN: FileCheck -check-prefix=NAN-DEFAULT %s
63 // NAN-DEFAULT: -cc1as
64 // NAN-DEFAULT-NOT: "-target-feature" "{{[-+]}}nan2008"
66 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mnan=legacy 2>&1 | \
67 // RUN: FileCheck -check-prefix=NAN-LEGACY %s
69 // NAN-LEGACY: "-target-feature" "-nan2008"
71 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mnan=2008 2>&1 | \
72 // RUN: FileCheck -check-prefix=NAN-2008 %s
74 // NAN-2008: "-target-feature" "+nan2008"
76 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
77 // RUN: FileCheck -check-prefix=DEFAULT-FLOAT %s
78 // DEFAULT-FLOAT: -cc1as
79 // DEFAULT-FLOAT-NOT: "-target-feature" "{{[+-]}}single-float"
81 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msingle-float 2>&1 | \
82 // RUN: FileCheck -check-prefix=SINGLE-FLOAT %s
83 // SINGLE-FLOAT: -cc1as
84 // SINGLE-FLOAT: "-target-feature" "+single-float"
86 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdouble-float 2>&1 | \
87 // RUN: FileCheck -check-prefix=DOUBLE-FLOAT %s
88 // DOUBLE-FLOAT: -cc1as
89 // DOUBLE-FLOAT: "-target-feature" "-single-float"
91 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
92 // RUN: FileCheck -check-prefix=MIPS16-DEFAULT %s
93 // MIPS16-DEFAULT: -cc1as
94 // MIPS16-DEFAULT-NOT: "-target-feature" "{{[+-]}}mips16"
96 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips16 2>&1 | \
97 // RUN: FileCheck -check-prefix=MIPS16-ON %s
99 // MIPS16-ON: "-target-feature" "+mips16"
101 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-mips16 2>&1 | \
102 // RUN: FileCheck -check-prefix=MIPS16-OFF %s
103 // MIPS16-OFF: -cc1as
104 // MIPS16-OFF: "-target-feature" "-mips16"
106 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
107 // RUN: FileCheck -check-prefix=MICROMIPS-DEFAULT %s
108 // MICROMIPS-DEFAULT: -cc1as
109 // MICROMIPS-DEFAULT-NOT: "-target-feature" "{{[+-]}}micromips"
111 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmicromips 2>&1 | \
112 // RUN: FileCheck -check-prefix=MICROMIPS-ON %s
113 // MICROMIPS-ON: -cc1as
114 // MICROMIPS-ON: "-target-feature" "+micromips"
116 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-micromips 2>&1 | \
117 // RUN: FileCheck -check-prefix=MICROMIPS-OFF %s
118 // MICROMIPS-OFF: -cc1as
119 // MICROMIPS-OFF: "-target-feature" "-micromips"
121 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
122 // RUN: FileCheck -check-prefix=DSP-DEFAULT %s
123 // DSP-DEFAULT: -cc1as
124 // DSP-DEFAULT-NOT: "-target-feature" "{{[+-]}}dsp"
126 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdsp 2>&1 | \
127 // RUN: FileCheck -check-prefix=DSP-ON %s
129 // DSP-ON: "-target-feature" "+dsp"
131 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dsp 2>&1 | \
132 // RUN: FileCheck -check-prefix=DSP-OFF %s
134 // DSP-OFF: "-target-feature" "-dsp"
136 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
137 // RUN: FileCheck -check-prefix=DSPR2-DEFAULT %s
138 // DSPR2-DEFAULT: -cc1as
139 // DSPR2-DEFAULT-NOT: "-target-feature" "{{[+-]}}dspr2"
141 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdspr2 2>&1 | \
142 // RUN: FileCheck -check-prefix=DSPR2-ON %s
144 // DSPR2-ON: "-target-feature" "+dspr2"
146 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dspr2 2>&1 | \
147 // RUN: FileCheck -check-prefix=DSPR2-OFF %s
149 // DSPR2-OFF: "-target-feature" "-dspr2"
151 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
152 // RUN: FileCheck -check-prefix=MSA-DEFAULT %s
153 // MSA-DEFAULT: -cc1as
154 // MSA-DEFAULT-NOT: "-target-feature" "{{[+-]}}msa"
156 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmsa 2>&1 | \
157 // RUN: FileCheck -check-prefix=MSA-ON %s
159 // MSA-ON: "-target-feature" "+msa"
161 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-msa 2>&1 | \
162 // RUN: FileCheck -check-prefix=MSA-OFF %s
164 // MSA-OFF: "-target-feature" "-msa"
166 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
167 // RUN: FileCheck -check-prefix=FPXX-DEFAULT %s
168 // FPXX-DEFAULT: -cc1as
169 // FPXX-DEFAULT-NOT: "-target-feature" "+fpxx"
170 // FPXX-DEFAULT-NOT: "-target-feature" "+nooddspreg"
172 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp32 2>&1 | \
173 // RUN: FileCheck -check-prefix=FP32 %s
175 // FP32: "-target-feature" "-fp64"
177 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx 2>&1 | \
178 // RUN: FileCheck -check-prefix=FPXX %s
180 // FPXX: "-target-feature" "+fpxx"
181 // FPXX: "-target-feature" "+nooddspreg"
183 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp64 2>&1 | \
184 // RUN: FileCheck -check-prefix=FP64 %s
186 // FP64: "-target-feature" "+fp64"
188 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
189 // RUN: FileCheck -check-prefix=ODDSPREG-DEFAULT %s
190 // ODDSPREG-DEFAULT: -cc1as
191 // ODDSPREG-DEFAULT-NOT: "-target-feature" "{{[+-]}}nooddspreg"
193 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -modd-spreg 2>&1 | \
194 // RUN: FileCheck -check-prefix=ODDSPREG-ON %s
195 // ODDSPREG-ON: -cc1as
196 // ODDSPREG-ON: "-target-feature" "-nooddspreg"
198 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-odd-spreg 2>&1 | \
199 // RUN: FileCheck -check-prefix=ODDSPREG-OFF %s
200 // ODDSPREG-OFF: -cc1as
201 // ODDSPREG-OFF: "-target-feature" "+nooddspreg"
203 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx -modd-spreg 2>&1 | \
204 // RUN: FileCheck -check-prefix=FPXX-ODDSPREG %s
205 // FPXX-ODDSPREG: -cc1as
206 // FPXX-ODDSPREG: "-target-feature" "+fpxx"
207 // FPXX-ODDSPREG: "-target-feature" "-nooddspreg"
209 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabicalls 2>&1 | \
210 // RUN: FileCheck -check-prefix=ABICALLS-ON %s
211 // ABICALLS-ON: -cc1as
212 // ABICALLS-ON: "-target-feature" "-noabicalls"
214 // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-abicalls 2>&1 | \
215 // RUN: FileCheck -check-prefix=ABICALLS-OFF %s
216 // ABICALLS-OFF: -cc1as
217 // ABICALLS-OFF: "-target-feature" "+noabicalls"