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=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 \
80 // 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 \
176 // RUN: -### -S %s 2>&1 | FileCheck -check-prefix=PPC64NS %s
177 // PPC64NS: clang
178 // PPC64NS: "-cc1"
179 // PPC64NS: "-target-cpu" "ppc64"
180 
181 // RUN: %clang -target powerpc-fsl-linux -### -S %s \
182 // RUN: -mcpu=e500mc 2>&1 | FileCheck -check-prefix=PPCE500MC %s
183 // PPCE500MC: clang
184 // PPCE500MC: "-cc1"
185 // PPCE500MC: "-target-cpu" "e500mc"
186 
187 // RUN: %clang -target powerpc64-fsl-linux -### -S \
188 // RUN: %s -mcpu=e5500 2>&1 | FileCheck -check-prefix=PPCE5500 %s
189 // PPCE5500: clang
190 // PPCE5500: "-cc1"
191 // PPCE5500: "-target-cpu" "e5500"
192 
193 // 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"
200 
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"
206 // AMD64-MINGW: "amd64--mingw32"
207 // AMD64-MINGW: "-munwind-tables"
208 
209 // RUN: %clang -target i386-linux-android -### -S %s 2>&1 \
210 // RUN:        --sysroot=%S/Inputs/basic_android_tree/sysroot \
211 // RUN:   | FileCheck --check-prefix=ANDROID-X86 %s
212 // ANDROID-X86: clang
213 // ANDROID-X86: "-target-cpu" "core2"
214