• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2>&1 | FileCheck -check-prefix=I386 %s
2 // I386: "-triple" "i386-unknown-unknown"
3 // I386: "-S"
4 // I386: "-disable-free"
5 // I386: "-mrelocation-model" "static"
6 // I386: "-mdisable-fp-elim"
7 // I386: "-masm-verbose"
8 // I386: "-munwind-tables"
9 // I386: "-Os"
10 // I386: "-fvisibility"
11 // I386: "hidden"
12 // I386: "-o"
13 // I386: clang-translation
14 // RUN: %clang -target i386-apple-darwin9 -### -S %s -o %t.s 2>&1 | \
15 // RUN: FileCheck -check-prefix=YONAH %s
16 // YONAH: "-target-cpu"
17 // YONAH: "yonah"
18 // RUN: %clang -target x86_64-apple-darwin9 -### -S %s -o %t.s 2>&1 | \
19 // RUN: FileCheck -check-prefix=CORE2 %s
20 // CORE2: "-target-cpu"
21 // CORE2: "core2"
22 // RUN: %clang -target x86_64h-apple-darwin -### -S %s -o %t.s 2>&1 | \
23 // RUN: FileCheck -check-prefix=AVX2 %s
24 // AVX2: "-target-cpu"
25 // AVX2: "core-avx2"
26 
27 // RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 2>&1 | \
28 // RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s
29 // ARMV7_DEFAULT: clang
30 // ARMV7_DEFAULT: "-cc1"
31 // ARMV7_DEFAULT-NOT: "-msoft-float"
32 // ARMV7_DEFAULT: "-mfloat-abi" "soft"
33 // ARMV7_DEFAULT-NOT: "-msoft-float"
34 // ARMV7_DEFAULT: "-x" "c"
35 
36 // RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \
37 // RUN: -msoft-float 2>&1 | FileCheck -check-prefix=ARMV7_SOFTFLOAT %s
38 // ARMV7_SOFTFLOAT: clang
39 // ARMV7_SOFTFLOAT: "-cc1"
40 // ARMV7_SOFTFLOAT: "-target-feature"
41 // ARMV7_SOFTFLOAT: "-neon"
42 // ARMV7_SOFTFLOAT: "-msoft-float"
43 // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"
44 // ARMV7_SOFTFLOAT: "-x" "c"
45 
46 // RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \
47 // RUN: -mhard-float 2>&1 | FileCheck -check-prefix=ARMV7_HARDFLOAT %s
48 // ARMV7_HARDFLOAT: clang
49 // ARMV7_HARDFLOAT: "-cc1"
50 // ARMV7_HARDFLOAT-NOT: "-msoft-float"
51 // ARMV7_HARDFLOAT: "-mfloat-abi" "hard"
52 // ARMV7_HARDFLOAT-NOT: "-msoft-float"
53 // ARMV7_HARDFLOAT: "-x" "c"
54 
55 // RUN: %clang -target arm-linux -### -S %s -march=armv5e 2>&1 | \
56 // RUN: FileCheck -check-prefix=ARMV5E %s
57 // ARMV5E: clang
58 // ARMV5E: "-cc1"
59 // ARMV5E: "-target-cpu" "arm1022e"
60 
61 // RUN: %clang -target powerpc64-unknown-linux-gnu \
62 // RUN: -### -S %s -mcpu=G5 2>&1 | FileCheck -check-prefix=PPCG5 %s
63 // PPCG5: clang
64 // PPCG5: "-cc1"
65 // PPCG5: "-target-cpu" "g5"
66 
67 // RUN: %clang -target powerpc64-unknown-linux-gnu \
68 // RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPWR7 %s
69 // PPCPWR7: clang
70 // PPCPWR7: "-cc1"
71 // PPCPWR7: "-target-cpu" "pwr7"
72 
73 // RUN: %clang -target powerpc64-unknown-linux-gnu \
74 // RUN: -### -S %s -mcpu=power8 2>&1 | FileCheck -check-prefix=PPCPWR8 %s
75 // PPCPWR8: clang
76 // PPCPWR8: "-cc1"
77 // PPCPWR8: "-target-cpu" "pwr8"
78 
79 // RUN: %clang -target powerpc64-unknown-linux-gnu \
80 // RUN: -### -S %s -mcpu=a2q 2>&1 | FileCheck -check-prefix=PPCA2Q %s
81 // PPCA2Q: clang
82 // PPCA2Q: "-cc1"
83 // PPCA2Q: "-target-cpu" "a2q"
84 
85 // RUN: %clang -target powerpc64-unknown-linux-gnu \
86 // RUN: -### -S %s -mcpu=630 2>&1 | FileCheck -check-prefix=PPC630 %s
87 // PPC630: clang
88 // PPC630: "-cc1"
89 // PPC630: "-target-cpu" "pwr3"
90 
91 // RUN: %clang -target powerpc64-unknown-linux-gnu \
92 // RUN: -### -S %s -mcpu=power3 2>&1 | FileCheck -check-prefix=PPCPOWER3 %s
93 // PPCPOWER3: clang
94 // PPCPOWER3: "-cc1"
95 // PPCPOWER3: "-target-cpu" "pwr3"
96 
97 // RUN: %clang -target powerpc64-unknown-linux-gnu \
98 // RUN: -### -S %s -mcpu=pwr3 2>&1 | FileCheck -check-prefix=PPCPWR3 %s
99 // PPCPWR3: clang
100 // PPCPWR3: "-cc1"
101 // PPCPWR3: "-target-cpu" "pwr3"
102 
103 // RUN: %clang -target powerpc64-unknown-linux-gnu \
104 // RUN: -### -S %s -mcpu=power4 2>&1 | FileCheck -check-prefix=PPCPOWER4 %s
105 // PPCPOWER4: clang
106 // PPCPOWER4: "-cc1"
107 // PPCPOWER4: "-target-cpu" "pwr4"
108 
109 // RUN: %clang -target powerpc64-unknown-linux-gnu \
110 // RUN: -### -S %s -mcpu=pwr4 2>&1 | FileCheck -check-prefix=PPCPWR4 %s
111 // PPCPWR4: clang
112 // PPCPWR4: "-cc1"
113 // PPCPWR4: "-target-cpu" "pwr4"
114 
115 // RUN: %clang -target powerpc64-unknown-linux-gnu \
116 // RUN: -### -S %s -mcpu=power5 2>&1 | FileCheck -check-prefix=PPCPOWER5 %s
117 // PPCPOWER5: clang
118 // PPCPOWER5: "-cc1"
119 // PPCPOWER5: "-target-cpu" "pwr5"
120 
121 // RUN: %clang -target powerpc64-unknown-linux-gnu \
122 // RUN: -### -S %s -mcpu=pwr5 2>&1 | FileCheck -check-prefix=PPCPWR5 %s
123 // PPCPWR5: clang
124 // PPCPWR5: "-cc1"
125 // PPCPWR5: "-target-cpu" "pwr5"
126 
127 // RUN: %clang -target powerpc64-unknown-linux-gnu \
128 // RUN: -### -S %s -mcpu=power5x 2>&1 | FileCheck -check-prefix=PPCPOWER5X %s
129 // PPCPOWER5X: clang
130 // PPCPOWER5X: "-cc1"
131 // PPCPOWER5X: "-target-cpu" "pwr5x"
132 
133 // RUN: %clang -target powerpc64-unknown-linux-gnu \
134 // RUN: -### -S %s -mcpu=pwr5x 2>&1 | FileCheck -check-prefix=PPCPWR5X %s
135 // PPCPWR5X: clang
136 // PPCPWR5X: "-cc1"
137 // PPCPWR5X: "-target-cpu" "pwr5x"
138 
139 // RUN: %clang -target powerpc64-unknown-linux-gnu \
140 // RUN: -### -S %s -mcpu=power6 2>&1 | FileCheck -check-prefix=PPCPOWER6 %s
141 // PPCPOWER6: clang
142 // PPCPOWER6: "-cc1"
143 // PPCPOWER6: "-target-cpu" "pwr6"
144 
145 // RUN: %clang -target powerpc64-unknown-linux-gnu \
146 // RUN: -### -S %s -mcpu=pwr6 2>&1 | FileCheck -check-prefix=PPCPWR6 %s
147 // PPCPWR6: clang
148 // PPCPWR6: "-cc1"
149 // PPCPWR6: "-target-cpu" "pwr6"
150 
151 // RUN: %clang -target powerpc64-unknown-linux-gnu \
152 // RUN: -### -S %s -mcpu=power6x 2>&1 | FileCheck -check-prefix=PPCPOWER6X %s
153 // PPCPOWER6X: clang
154 // PPCPOWER6X: "-cc1"
155 // PPCPOWER6X: "-target-cpu" "pwr6x"
156 
157 // RUN: %clang -target powerpc64-unknown-linux-gnu \
158 // RUN: -### -S %s -mcpu=pwr6x 2>&1 | FileCheck -check-prefix=PPCPWR6X %s
159 // PPCPWR6X: clang
160 // PPCPWR6X: "-cc1"
161 // PPCPWR6X: "-target-cpu" "pwr6x"
162 
163 // RUN: %clang -target powerpc64-unknown-linux-gnu \
164 // RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPOWER7 %s
165 // PPCPOWER7: clang
166 // PPCPOWER7: "-cc1"
167 // PPCPOWER7: "-target-cpu" "pwr7"
168 
169 // RUN: %clang -target powerpc64-unknown-linux-gnu \
170 // RUN: -### -S %s -mcpu=powerpc 2>&1 | FileCheck -check-prefix=PPCPOWERPC %s
171 // PPCPOWERPC: clang
172 // PPCPOWERPC: "-cc1"
173 // PPCPOWERPC: "-target-cpu" "ppc"
174 
175 // RUN: %clang -target powerpc64-unknown-linux-gnu \
176 // RUN: -### -S %s -mcpu=powerpc64 2>&1 | FileCheck -check-prefix=PPCPOWERPC64 %s
177 // PPCPOWERPC64: clang
178 // PPCPOWERPC64: "-cc1"
179 // PPCPOWERPC64: "-target-cpu" "ppc64"
180 
181 // RUN: %clang -target powerpc64-unknown-linux-gnu \
182 // RUN: -### -S %s 2>&1 | FileCheck -check-prefix=PPC64NS %s
183 // PPC64NS: clang
184 // PPC64NS: "-cc1"
185 // PPC64NS: "-target-cpu" "ppc64"
186 
187 // RUN: %clang -target powerpc-fsl-linux -### -S %s \
188 // RUN: -mcpu=e500mc 2>&1 | FileCheck -check-prefix=PPCE500MC %s
189 // PPCE500MC: clang
190 // PPCE500MC: "-cc1"
191 // PPCE500MC: "-target-cpu" "e500mc"
192 
193 // RUN: %clang -target powerpc64-fsl-linux -### -S \
194 // RUN: %s -mcpu=e5500 2>&1 | FileCheck -check-prefix=PPCE5500 %s
195 // PPCE5500: clang
196 // PPCE5500: "-cc1"
197 // PPCE5500: "-target-cpu" "e5500"
198 
199 // RUN: %clang -target amd64-unknown-openbsd5.2 -### -S %s 2>&1 | \
200 // RUN: FileCheck -check-prefix=AMD64 %s
201 // AMD64: clang
202 // AMD64: "-cc1"
203 // AMD64: "-triple"
204 // AMD64: "amd64-unknown-openbsd5.2"
205 // AMD64: "-munwind-tables"
206 
207 // RUN: %clang -target amd64--mingw32 -### -S %s 2>&1 | \
208 // RUN: FileCheck -check-prefix=AMD64-MINGW %s
209 // AMD64-MINGW: clang
210 // AMD64-MINGW: "-cc1"
211 // AMD64-MINGW: "-triple"
212 // AMD64-MINGW: "amd64--windows-gnu"
213 // AMD64-MINGW: "-munwind-tables"
214 
215 // RUN: %clang -target i686-linux-android -### -S %s 2>&1 \
216 // RUN:        --sysroot=%S/Inputs/basic_android_tree/sysroot \
217 // RUN:   | FileCheck --check-prefix=ANDROID-X86 %s
218 // ANDROID-X86: clang
219 // ANDROID-X86: "-target-cpu" "i686"
220 // ANDROID-X86: "-target-feature" "+ssse3"
221 
222 // RUN: %clang -target x86_64-linux-android -### -S %s 2>&1 \
223 // RUN:        --sysroot=%S/Inputs/basic_android_tree/sysroot \
224 // RUN:   | FileCheck --check-prefix=ANDROID-X86_64 %s
225 // ANDROID-X86_64: clang
226 // ANDROID-X86_64: "-target-cpu" "x86-64"
227 // ANDROID-X86_64: "-target-feature" "+sse4.2"
228 // ANDROID-X86_64: "-target-feature" "+popcnt"
229 
230 // RUN: %clang -target mips-linux-gnu -### -S %s 2>&1 | \
231 // RUN: FileCheck -check-prefix=MIPS %s
232 // MIPS: clang
233 // MIPS: "-cc1"
234 // MIPS: "-target-cpu" "mips32r2"
235 // MIPS: "-mfloat-abi" "hard"
236 
237 // RUN: %clang -target mipsel-linux-gnu -### -S %s 2>&1 | \
238 // RUN: FileCheck -check-prefix=MIPSEL %s
239 // MIPSEL: clang
240 // MIPSEL: "-cc1"
241 // MIPSEL: "-target-cpu" "mips32r2"
242 // MIPSEL: "-mfloat-abi" "hard"
243 
244 // RUN: %clang -target mipsel-linux-android -### -S %s 2>&1 | \
245 // RUN: FileCheck -check-prefix=MIPSEL-ANDROID %s
246 // MIPSEL-ANDROID: clang
247 // MIPSEL-ANDROID: "-cc1"
248 // MIPSEL-ANDROID: "-target-cpu" "mips32"
249 // MIPSEL-ANDROID: "-target-feature" "+fpxx"
250 // MIPSEL-ANDROID: "-target-feature" "+nooddspreg"
251 // MIPSEL-ANDROID: "-mfloat-abi" "hard"
252 
253 // RUN: %clang -target mipsel-linux-android -### -S %s -mcpu=mips32r6 2>&1 | \
254 // RUN: FileCheck -check-prefix=MIPSEL-ANDROID-R6 %s
255 // MIPSEL-ANDROID-R6: clang
256 // MIPSEL-ANDROID-R6: "-cc1"
257 // MIPSEL-ANDROID-R6: "-target-cpu" "mips32r6"
258 // MIPSEL-ANDROID-R6: "-target-feature" "+fp64"
259 // MIPSEL-ANDROID-R6: "-target-feature" "+nooddspreg"
260 // MIPSEL-ANDROID-R6: "-mfloat-abi" "hard"
261 
262 // RUN: %clang -target mips64-linux-gnu -### -S %s 2>&1 | \
263 // RUN: FileCheck -check-prefix=MIPS64 %s
264 // MIPS64: clang
265 // MIPS64: "-cc1"
266 // MIPS64: "-target-cpu" "mips64r2"
267 // MIPS64: "-mfloat-abi" "hard"
268 
269 // RUN: %clang -target mips64el-linux-gnu -### -S %s 2>&1 | \
270 // RUN: FileCheck -check-prefix=MIPS64EL %s
271 // MIPS64EL: clang
272 // MIPS64EL: "-cc1"
273 // MIPS64EL: "-target-cpu" "mips64r2"
274 // MIPS64EL: "-mfloat-abi" "hard"
275 
276 // RUN: %clang -target mips64el-linux-android -### -S %s 2>&1 | \
277 // RUN: FileCheck -check-prefix=MIPS64EL-ANDROID %s
278 // MIPS64EL-ANDROID: clang
279 // MIPS64EL-ANDROID: "-cc1"
280 // MIPS64EL-ANDROID: "-target-cpu" "mips64r6"
281 // MIPS64EL-ANDROID: "-mfloat-abi" "hard"
282