blob: 54e5bbec0264eafb256d2884b350b2f9bd742033 [file] [log] [blame]
Rafael Espindola0d8ecf32012-09-22 15:26:38 +00001// 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
Rafael Espindolad0364fb2012-09-22 22:30:04 +000014// 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"
Jim Grosbach32ca73e2013-11-16 00:53:35 +000022// 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"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000026
Rafael Espindola77072622012-09-22 22:51:00 +000027// RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 2>&1 | \
28// RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s
Daniel Dunbar8ff5b282009-12-11 23:00:49 +000029// ARMV7_DEFAULT: clang
30// ARMV7_DEFAULT: "-cc1"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000031// ARMV7_DEFAULT-NOT: "-msoft-float"
32// ARMV7_DEFAULT: "-mfloat-abi" "soft"
33// ARMV7_DEFAULT-NOT: "-msoft-float"
34// ARMV7_DEFAULT: "-x" "c"
35
Rafael Espindola77072622012-09-22 22:51:00 +000036// RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \
37// RUN: -msoft-float 2>&1 | FileCheck -check-prefix=ARMV7_SOFTFLOAT %s
Daniel Dunbar8ff5b282009-12-11 23:00:49 +000038// ARMV7_SOFTFLOAT: clang
39// ARMV7_SOFTFLOAT: "-cc1"
Daniel Dunbar7187fac2011-03-17 00:07:34 +000040// ARMV7_SOFTFLOAT: "-target-feature"
41// ARMV7_SOFTFLOAT: "-neon"
Rafael Espindola146dbbf2013-08-21 16:39:20 +000042// ARMV7_SOFTFLOAT: "-msoft-float"
43// ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000044// ARMV7_SOFTFLOAT: "-x" "c"
45
Rafael Espindola77072622012-09-22 22:51:00 +000046// RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \
47// RUN: -mhard-float 2>&1 | FileCheck -check-prefix=ARMV7_HARDFLOAT %s
Daniel Dunbar8ff5b282009-12-11 23:00:49 +000048// ARMV7_HARDFLOAT: clang
49// ARMV7_HARDFLOAT: "-cc1"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000050// ARMV7_HARDFLOAT-NOT: "-msoft-float"
51// ARMV7_HARDFLOAT: "-mfloat-abi" "hard"
52// ARMV7_HARDFLOAT-NOT: "-msoft-float"
53// ARMV7_HARDFLOAT: "-x" "c"
Evgeniy Stepanov4add84f2012-04-25 08:35:56 +000054
Rafael Espindola77072622012-09-22 22:51:00 +000055// RUN: %clang -target arm-linux -### -S %s -march=armv5e 2>&1 | \
56// RUN: FileCheck -check-prefix=ARMV5E %s
Evgeniy Stepanov4add84f2012-04-25 08:35:56 +000057// ARMV5E: clang
58// ARMV5E: "-cc1"
59// ARMV5E: "-target-cpu" "arm1022e"
Hal Finkel02a84272012-06-11 22:35:19 +000060
Rafael Espindola238b6a92012-10-09 20:46:28 +000061// RUN: %clang -target powerpc64-unknown-linux-gnu \
Rafael Espindola77072622012-09-22 22:51:00 +000062// RUN: -### -S %s -mcpu=G5 2>&1 | FileCheck -check-prefix=PPCG5 %s
Hal Finkel02a84272012-06-11 22:35:19 +000063// PPCG5: clang
64// PPCG5: "-cc1"
65// PPCG5: "-target-cpu" "g5"
66
Rafael Espindola238b6a92012-10-09 20:46:28 +000067// RUN: %clang -target powerpc64-unknown-linux-gnu \
Rafael Espindola77072622012-09-22 22:51:00 +000068// RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPWR7 %s
Hal Finkel02a84272012-06-11 22:35:19 +000069// PPCPWR7: clang
70// PPCPWR7: "-cc1"
71// PPCPWR7: "-target-cpu" "pwr7"
72
Rafael Espindola238b6a92012-10-09 20:46:28 +000073// RUN: %clang -target powerpc64-unknown-linux-gnu \
Hal Finkel5ccd3d02013-02-01 05:53:33 +000074// RUN: -### -S %s -mcpu=a2q 2>&1 | FileCheck -check-prefix=PPCA2Q %s
75// PPCA2Q: clang
76// PPCA2Q: "-cc1"
77// PPCA2Q: "-target-cpu" "a2q"
78
79// RUN: %clang -target powerpc64-unknown-linux-gnu \
Bill Schmidt2821e182013-02-01 20:23:10 +000080// RUN: -### -S %s -mcpu=630 2>&1 | FileCheck -check-prefix=PPC630 %s
81// PPC630: clang
82// PPC630: "-cc1"
83// PPC630: "-target-cpu" "pwr3"
84
85// RUN: %clang -target powerpc64-unknown-linux-gnu \
86// RUN: -### -S %s -mcpu=power3 2>&1 | FileCheck -check-prefix=PPCPOWER3 %s
87// PPCPOWER3: clang
88// PPCPOWER3: "-cc1"
89// PPCPOWER3: "-target-cpu" "pwr3"
90
91// RUN: %clang -target powerpc64-unknown-linux-gnu \
92// RUN: -### -S %s -mcpu=pwr3 2>&1 | FileCheck -check-prefix=PPCPWR3 %s
93// PPCPWR3: clang
94// PPCPWR3: "-cc1"
95// PPCPWR3: "-target-cpu" "pwr3"
96
97// RUN: %clang -target powerpc64-unknown-linux-gnu \
98// RUN: -### -S %s -mcpu=power4 2>&1 | FileCheck -check-prefix=PPCPOWER4 %s
99// PPCPOWER4: clang
100// PPCPOWER4: "-cc1"
101// PPCPOWER4: "-target-cpu" "pwr4"
102
103// RUN: %clang -target powerpc64-unknown-linux-gnu \
104// RUN: -### -S %s -mcpu=pwr4 2>&1 | FileCheck -check-prefix=PPCPWR4 %s
105// PPCPWR4: clang
106// PPCPWR4: "-cc1"
107// PPCPWR4: "-target-cpu" "pwr4"
108
109// RUN: %clang -target powerpc64-unknown-linux-gnu \
110// RUN: -### -S %s -mcpu=power5 2>&1 | FileCheck -check-prefix=PPCPOWER5 %s
111// PPCPOWER5: clang
112// PPCPOWER5: "-cc1"
113// PPCPOWER5: "-target-cpu" "pwr5"
114
115// RUN: %clang -target powerpc64-unknown-linux-gnu \
116// RUN: -### -S %s -mcpu=pwr5 2>&1 | FileCheck -check-prefix=PPCPWR5 %s
117// PPCPWR5: clang
118// PPCPWR5: "-cc1"
119// PPCPWR5: "-target-cpu" "pwr5"
120
121// RUN: %clang -target powerpc64-unknown-linux-gnu \
122// RUN: -### -S %s -mcpu=power5x 2>&1 | FileCheck -check-prefix=PPCPOWER5X %s
123// PPCPOWER5X: clang
124// PPCPOWER5X: "-cc1"
125// PPCPOWER5X: "-target-cpu" "pwr5x"
126
127// RUN: %clang -target powerpc64-unknown-linux-gnu \
128// RUN: -### -S %s -mcpu=pwr5x 2>&1 | FileCheck -check-prefix=PPCPWR5X %s
129// PPCPWR5X: clang
130// PPCPWR5X: "-cc1"
131// PPCPWR5X: "-target-cpu" "pwr5x"
132
133// RUN: %clang -target powerpc64-unknown-linux-gnu \
134// RUN: -### -S %s -mcpu=power6 2>&1 | FileCheck -check-prefix=PPCPOWER6 %s
135// PPCPOWER6: clang
136// PPCPOWER6: "-cc1"
137// PPCPOWER6: "-target-cpu" "pwr6"
138
139// RUN: %clang -target powerpc64-unknown-linux-gnu \
140// RUN: -### -S %s -mcpu=pwr6 2>&1 | FileCheck -check-prefix=PPCPWR6 %s
141// PPCPWR6: clang
142// PPCPWR6: "-cc1"
143// PPCPWR6: "-target-cpu" "pwr6"
144
145// RUN: %clang -target powerpc64-unknown-linux-gnu \
146// RUN: -### -S %s -mcpu=power6x 2>&1 | FileCheck -check-prefix=PPCPOWER6X %s
147// PPCPOWER6X: clang
148// PPCPOWER6X: "-cc1"
149// PPCPOWER6X: "-target-cpu" "pwr6x"
150
151// RUN: %clang -target powerpc64-unknown-linux-gnu \
152// RUN: -### -S %s -mcpu=pwr6x 2>&1 | FileCheck -check-prefix=PPCPWR6X %s
153// PPCPWR6X: clang
154// PPCPWR6X: "-cc1"
155// PPCPWR6X: "-target-cpu" "pwr6x"
156
157// RUN: %clang -target powerpc64-unknown-linux-gnu \
158// RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPOWER7 %s
159// PPCPOWER7: clang
160// PPCPOWER7: "-cc1"
161// PPCPOWER7: "-target-cpu" "pwr7"
162
163// RUN: %clang -target powerpc64-unknown-linux-gnu \
164// RUN: -### -S %s -mcpu=powerpc 2>&1 | FileCheck -check-prefix=PPCPOWERPC %s
165// PPCPOWERPC: clang
166// PPCPOWERPC: "-cc1"
167// PPCPOWERPC: "-target-cpu" "ppc"
168
169// RUN: %clang -target powerpc64-unknown-linux-gnu \
170// RUN: -### -S %s -mcpu=powerpc64 2>&1 | FileCheck -check-prefix=PPCPOWERPC64 %s
171// PPCPOWERPC64: clang
172// PPCPOWERPC64: "-cc1"
173// PPCPOWERPC64: "-target-cpu" "ppc64"
174
175// RUN: %clang -target powerpc64-unknown-linux-gnu \
Rafael Espindola77072622012-09-22 22:51:00 +0000176// RUN: -### -S %s 2>&1 | FileCheck -check-prefix=PPC64NS %s
Hal Finkel02a84272012-06-11 22:35:19 +0000177// PPC64NS: clang
178// PPC64NS: "-cc1"
179// PPC64NS: "-target-cpu" "ppc64"
Hal Finkel7de32962012-09-18 22:25:03 +0000180
Rafael Espindola238b6a92012-10-09 20:46:28 +0000181// RUN: %clang -target powerpc-fsl-linux -### -S %s \
Rafael Espindola77072622012-09-22 22:51:00 +0000182// RUN: -mcpu=e500mc 2>&1 | FileCheck -check-prefix=PPCE500MC %s
Hal Finkel7de32962012-09-18 22:25:03 +0000183// PPCE500MC: clang
184// PPCE500MC: "-cc1"
185// PPCE500MC: "-target-cpu" "e500mc"
186
Rafael Espindola238b6a92012-10-09 20:46:28 +0000187// RUN: %clang -target powerpc64-fsl-linux -### -S \
Rafael Espindola77072622012-09-22 22:51:00 +0000188// RUN: %s -mcpu=e5500 2>&1 | FileCheck -check-prefix=PPCE5500 %s
Hal Finkel7de32962012-09-18 22:25:03 +0000189// PPCE5500: clang
190// PPCE5500: "-cc1"
191// PPCE5500: "-target-cpu" "e5500"
192
Rafael Espindola6f009b62012-09-22 15:04:11 +0000193// RUN: %clang -target amd64-unknown-openbsd5.2 -### -S %s 2>&1 | \
194// RUN: FileCheck -check-prefix=AMD64 %s
195// AMD64: clang
196// AMD64: "-cc1"
197// AMD64: "-triple"
198// AMD64: "amd64-unknown-openbsd5.2"
199// AMD64: "-munwind-tables"
Rafael Espindolaa4a809e2012-10-07 03:23:40 +0000200
201// RUN: %clang -target amd64--mingw32 -### -S %s 2>&1 | \
202// RUN: FileCheck -check-prefix=AMD64-MINGW %s
203// AMD64-MINGW: clang
204// AMD64-MINGW: "-cc1"
205// AMD64-MINGW: "-triple"
Stephen Hines651f13c2014-04-23 16:59:28 -0700206// AMD64-MINGW: "amd64--windows-gnu"
Rafael Espindolaa4a809e2012-10-07 03:23:40 +0000207// AMD64-MINGW: "-munwind-tables"
Rafael Espindola715852c2012-11-02 20:41:30 +0000208
Stephen Hines651f13c2014-04-23 16:59:28 -0700209// RUN: %clang -target i686-linux-android -### -S %s 2>&1 \
Rafael Espindola715852c2012-11-02 20:41:30 +0000210// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
211// RUN: | FileCheck --check-prefix=ANDROID-X86 %s
212// ANDROID-X86: clang
Stephen Hines651f13c2014-04-23 16:59:28 -0700213// ANDROID-X86: "-target-cpu" "i686"
214// ANDROID-X86: "-target-feature" "+sse3"
215
216// RUN: %clang -target x86_64-linux-android -### -S %s 2>&1 \
217// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
218// RUN: | FileCheck --check-prefix=ANDROID-X86_64 %s
219// ANDROID-X86_64: clang
220// ANDROID-X86_64: "-target-cpu" "x86-64"
221// ANDROID-X86_64: "-target-feature" "+sse3"
222
223// RUN: %clang -target mips-linux-gnu -### -S %s 2>&1 | \
224// RUN: FileCheck -check-prefix=MIPS %s
225// MIPS: clang
226// MIPS: "-cc1"
227// MIPS: "-target-cpu" "mips32r2"
228// MIPS: "-mfloat-abi" "hard"
229
230// RUN: %clang -target mipsel-linux-gnu -### -S %s 2>&1 | \
231// RUN: FileCheck -check-prefix=MIPSEL %s
232// MIPSEL: clang
233// MIPSEL: "-cc1"
234// MIPSEL: "-target-cpu" "mips32r2"
235// MIPSEL: "-mfloat-abi" "hard"
236
237// RUN: %clang -target mipsel-linux-android -### -S %s 2>&1 | \
238// RUN: FileCheck -check-prefix=MIPSEL-ANDROID %s
239// MIPSEL-ANDROID: clang
240// MIPSEL-ANDROID: "-cc1"
241// MIPSEL-ANDROID: "-target-cpu" "mips32r2"
242// MIPSEL-ANDROID: "-mfloat-abi" "hard"
243
244// RUN: %clang -target mips64-linux-gnu -### -S %s 2>&1 | \
245// RUN: FileCheck -check-prefix=MIPS64 %s
246// MIPS64: clang
247// MIPS64: "-cc1"
248// MIPS64: "-target-cpu" "mips64r2"
249// MIPS64: "-mfloat-abi" "hard"
250
251// RUN: %clang -target mips64el-linux-gnu -### -S %s 2>&1 | \
252// RUN: FileCheck -check-prefix=MIPS64EL %s
253// MIPS64EL: clang
254// MIPS64EL: "-cc1"
255// MIPS64EL: "-target-cpu" "mips64r2"
256// MIPS64EL: "-mfloat-abi" "hard"
257
258// RUN: %clang -target mips64el-linux-android -### -S %s 2>&1 | \
259// RUN: FileCheck -check-prefix=MIPS64EL-ANDROID %s
260// MIPS64EL-ANDROID: clang
261// MIPS64EL-ANDROID: "-cc1"
262// MIPS64EL-ANDROID: "-target-cpu" "mips64r2"
263// MIPS64EL-ANDROID: "-mfloat-abi" "hard"