[NFC][RISCV] Remove CFIIndex argument from allocateStack (#117871)
[llvm-project.git] / clang / test / Driver / linux-as.c
blobfb6de85ba105b036401dfafd8b93394cbfa610fe
1 // Check passing options to the assembler for various linux targets.
2 //
3 // RUN: %clang -target arm-linux -### \
4 // RUN: -no-integrated-as -c %s 2>&1 \
5 // RUN: | FileCheck -check-prefix=CHECK-ARM %s
6 // CHECK-ARM: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft"
7 //
8 // RUN: %clang -target arm-linux -mcpu=cortex-a8 -### \
9 // RUN: -no-integrated-as -c %s 2>&1 \
10 // RUN: | FileCheck -check-prefix=CHECK-ARM-MCPU %s
11 // CHECK-ARM-MCPU: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft" "-mcpu=cortex-a8"
13 // RUN: %clang -target arm-linux -mfpu=neon -### \
14 // RUN: -no-integrated-as -c %s 2>&1 \
15 // RUN: | FileCheck -check-prefix=CHECK-ARM-MFPU %s
16 // CHECK-ARM-MFPU: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft" "-mfpu=neon"
18 // RUN: %clang --target=arm-linux -march=armv7-a -mabi=aapcs-linux -### \
19 // RUN: -no-integrated-as -c %s 2>&1 \
20 // RUN: | FileCheck -check-prefix=CHECK-ARM-MARCH %s
21 // CHECK-ARM-MARCH: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft" "-march=armv7-a"
22 // CHECK-ARM-MARCH-NOT: "-mabi=
24 // RUN: %clang -target armeb-linux -mlittle-endian -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \
25 // RUN: -no-integrated-as -c %s 2>&1 \
26 // RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s
27 // CHECK-ARM-ALL: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft" "-march=armv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
29 // RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \
30 // RUN: -no-integrated-as -c %s 2>&1 \
31 // RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s
33 // RUN: %clang -target armeb-linux -mlittle-endian -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \
34 // RUN: -no-integrated-as -c %s 2>&1 \
35 // RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s
37 // RUN: %clang -target armeb-linux -mcpu=cortex-a8 -mfpu=neon -march=armebv7-a -### \
38 // RUN: -no-integrated-as -c %s 2>&1 \
39 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-ALL %s
40 // CHECK-ARMEB-ALL: as{{(.exe)?}}" "-EB" "-mfloat-abi=soft" "-march=armebv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
42 // RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armebv7-a -mbig-endian -### \
43 // RUN: -no-integrated-as -c %s 2>&1 \
44 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-ALL %s
46 // RUN: %clang -target thumb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbv7-a -### \
47 // RUN: -no-integrated-as -c %s 2>&1 \
48 // RUN: | FileCheck -check-prefix=CHECK-THUMB-ALL %s
49 // CHECK-THUMB-ALL: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft" "-march=thumbv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
51 // RUN: %clang -target thumbeb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbv7-a -mlittle-endian -### \
52 // RUN: -no-integrated-as -c %s 2>&1 \
53 // RUN: | FileCheck -check-prefix=CHECK-THUMB-ALL %s
55 // RUN: %clang -target thumbeb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbebv7-a -### \
56 // RUN: -no-integrated-as -c %s 2>&1 \
57 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-ALL %s
58 // CHECK-THUMBEB-ALL: as{{(.exe)?}}" "-EB" "-mfloat-abi=soft" "-march=thumbebv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
60 // RUN: %clang -target thumb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbebv7-a -mbig-endian -### \
61 // RUN: -no-integrated-as -c %s 2>&1 \
62 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-ALL %s
64 // RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \
65 // RUN: -no-integrated-as -c %s 2>&1 \
66 // RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET %s
67 // CHECK-ARM-TARGET: as{{(.exe)?}}" "-EL" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
69 // RUN: %clang -target armebv7-linux -mcpu=cortex-a8 -### \
70 // RUN: -no-integrated-as -c %s 2>&1 \
71 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-TARGET %s
72 // CHECK-ARMEB-TARGET: as{{(.exe)?}}" "-EB" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
74 // RUN: %clang -target thumbv7-linux -mcpu=cortex-a8 -### \
75 // RUN: -no-integrated-as -c %s 2>&1 \
76 // RUN: | FileCheck -check-prefix=CHECK-THUMB-TARGET %s
77 // CHECK-THUMB-TARGET: as{{(.exe)?}}" "-EL" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
79 // RUN: %clang -target thumbebv7-linux -mcpu=cortex-a8 -### \
80 // RUN: -no-integrated-as -c %s 2>&1 \
81 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-TARGET %s
82 // CHECK-THUMBEB-TARGET: as{{(.exe)?}}" "-EB" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
84 // RUN: %clang -target armv8-linux -mcpu=cortex-a53 -### \
85 // RUN: -no-integrated-as -c %s 2>&1 \
86 // RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET-V8 %s
87 // CHECK-ARM-TARGET-V8: as{{(.exe)?}}" "-EL" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
89 // RUN: %clang -target armebv8-linux -mcpu=cortex-a53 -### \
90 // RUN: -no-integrated-as -c %s 2>&1 \
91 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-TARGET-V8 %s
92 // CHECK-ARMEB-TARGET-V8: as{{(.exe)?}}" "-EB" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
94 // RUN: %clang -target thumbv8-linux -mcpu=cortex-a53 -### \
95 // RUN: -no-integrated-as -c %s 2>&1 \
96 // RUN: | FileCheck -check-prefix=CHECK-THUMB-TARGET-V8 %s
97 // CHECK-THUMB-TARGET-V8: as{{(.exe)?}}" "-EL" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
99 // RUN: %clang -target thumbebv8-linux -mcpu=cortex-a53 -### \
100 // RUN: -no-integrated-as -c %s 2>&1 \
101 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-TARGET-V8 %s
102 // CHECK-THUMBEB-TARGET-V8: as{{(.exe)?}}" "-EB" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
104 // RUN: %clang -target arm-linux -mfloat-abi=hard -### \
105 // RUN: -no-integrated-as -c %s 2>&1 \
106 // RUN: | FileCheck -check-prefix=CHECK-ARM-MFLOAT-ABI %s
107 // CHECK-ARM-MFLOAT-ABI: as{{(.exe)?}}" "-EL" "-mfloat-abi=hard"
109 // RUN: %clang -target arm-linux-androideabi -### \
110 // RUN: -no-integrated-as -c %s 2>&1 \
111 // RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID %s
112 // CHECK-ARM-ANDROID: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft"
114 // RUN: %clang -target arm-linux-androideabi -march=armv7-a -### \
115 // RUN: -no-integrated-as -c %s 2>&1 \
116 // RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID-SOFTFP %s
117 // CHECK-ARM-ANDROID-SOFTFP: as{{(.exe)?}}" "-EL" "-mfloat-abi=softfp" "-march=armv7-a"
119 // RUN: %clang -target arm-linux-eabi -mhard-float -### \
120 // RUN: -no-integrated-as -c %s 2>&1 \
121 // RUN: | FileCheck -check-prefix=CHECK-ARM-HARDFP %s
122 // CHECK-ARM-HARDFP: as{{(.exe)?}}" "-EL" "-mfloat-abi=hard"
124 // RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -### \
125 // RUN: -no-integrated-as -c %s 2>&1 \
126 // RUN: | FileCheck -check-prefix=CHECK-ARM64-MCPU %s
127 // CHECK-ARM64-MCPU: as{{(.exe)?}}" "-EL" "-mcpu=cortex-a53"
129 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a -### \
130 // RUN: -no-integrated-as -c %s 2>&1 \
131 // RUN: | FileCheck -check-prefix=CHECK-ARM64-MARCH %s
132 // CHECK-ARM64-MARCH: as{{(.exe)?}}" "-EL" "-march=armv8-a"
134 // RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -march=armv8-a -### \
135 // RUN: -no-integrated-as -c %s 2>&1 \
136 // RUN: | FileCheck -check-prefix=CHECK-ARM64-ALL %s
137 // CHECK-ARM64-ALL: as{{(.exe)?}}" "-EL" "-march=armv8-a" "-mcpu=cortex-a53"
139 // RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -march=armv8-a -mlittle-endian -### \
140 // RUN: -no-integrated-as -c %s 2>&1 \
141 // RUN: | FileCheck -check-prefix=CHECK-ARM64-ALL %s
143 // RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -### \
144 // RUN: -no-integrated-as -c %s 2>&1 \
145 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-MCPU %s
146 // CHECK-ARM64BE-MCPU: as{{(.exe)?}}" "-EB" "-mcpu=cortex-a53"
148 // RUN: %clang -target aarch64_be-linux-gnu -march=armv8-a -### \
149 // RUN: -no-integrated-as -c %s 2>&1 \
150 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-MARCH %s
151 // CHECK-ARM64BE-MARCH: as{{(.exe)?}}" "-EB" "-march=armv8-a"
153 // RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -march=armv8-a -### \
154 // RUN: -no-integrated-as -c %s 2>&1 \
155 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-ALL %s
156 // CHECK-ARM64BE-ALL: as{{(.exe)?}}" "-EB" "-march=armv8-a" "-mcpu=cortex-a53"
158 // RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -march=armv8-a -mbig-endian -### \
159 // RUN: -no-integrated-as -c %s 2>&1 \
160 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-ALL %s
162 // RUN: %clang -target ppc-linux -mcpu=invalid-cpu -### \
163 // RUN: -no-integrated-as -c %s 2>&1 \
164 // RUN: | FileCheck -check-prefix=CHECK-PPC-NO-MCPU %s
165 // CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu"
167 // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
168 // RUN: -no-integrated-as -fno-pic -c %s 2>&1 \
169 // RUN: | FileCheck -check-prefix=CHECK-SPARCV9 %s
170 // CHECK-SPARCV9: as
171 // CHECK-SPARCV9: -64
172 // CHECK-SPARCV9: -Av9a
173 // CHECK-SPARCV9-NOT: -KPIC
174 // CHECK-SPARCV9: -o
176 // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
177 // RUN: -no-integrated-as -fpic -c %s 2>&1 \
178 // RUN: | FileCheck -check-prefix=CHECK-SPARCV9PIC %s
179 // CHECK-SPARCV9PIC: as
180 // CHECK-SPARCV9PIC: -64
181 // CHECK-SPARCV9PIC: -Av9a
182 // CHECK-SPARCV9PIC: -KPIC
183 // CHECK-SPARCV9PIC: -o
185 // RUN: %clang -target sparc-linux -mcpu=invalid-cpu -### \
186 // RUN: -no-integrated-as -c %s 2>&1 \
187 // RUN: | FileCheck -check-prefix=CHECK-SPARCV8 %s
188 // CHECK-SPARCV8: as
189 // CHECK-SPARCV8: -32
190 // CHECK-SPARCV8: -Av8
191 // CHECK-SPARCV8: -o
193 // RUN: %clang -target sparcel-linux -mcpu=invalid-cpu -### \
194 // RUN: -no-integrated-as -c %s 2>&1 \
195 // RUN: | FileCheck -check-prefix=CHECK-SPARCV8EL %s
196 // CHECK-SPARCV8EL: as
197 // CHECK-SPARCV8EL: -32
198 // CHECK-SPARCV8EL: -Av8
199 // CHECK-SPARCV8EL: -o
201 // RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \
202 // RUN: | FileCheck -check-prefix=CHECK-Z-DEFAULT-ARCH %s
203 // CHECK-Z-DEFAULT-ARCH: as{{.*}} "-march=z10"
205 // RUN: %clang -target s390x-linux -march=z196 -### \
206 // RUN: -no-integrated-as -c %s 2>&1 \
207 // RUN: | FileCheck -check-prefix=CHECK-Z-ARCH-Z196 %s
208 // CHECK-Z-ARCH-Z196: as{{.*}} "-march=z196"
210 // RUN: %clang -target powerpc64le-linux -### \
211 // RUN: -no-integrated-as -c %s 2>&1 \
212 // RUN: | FileCheck -check-prefix=CHECK-PPC64LE %s
213 // CHECK-PPC64LE: as{{.*}} "-mpower8"
215 // RUN: %clang -target powerpc64-linux -mcpu=pwr7 -### \
216 // RUN: -no-integrated-as -c %s 2>&1 \
217 // RUN: | FileCheck -check-prefix=CHECK-PPC64 %s
218 // CHECK-PPC64: as{{.*}} "-mpower7"
220 // RUN: %clang -target powerpc-linux -mcpu=pwr9 -### \
221 // RUN: -no-integrated-as -c %s 2>&1 \
222 // RUN: | FileCheck -check-prefix=CHECK-PPC32 %s
223 // CHECK-PPC32: as{{.*}} "-mpower9"