blob: 68cf403d97892f12f40ab52ffa3529f95a181258 [file] [log] [blame]
Richard Sandiford4652d892013-07-19 16:51:51 +00001// Check passing options to the assembler for various linux targets.
Evgeniy Stepanov70cb3d62012-04-10 09:05:40 +00002//
3// RUN: %clang -target arm-linux -### \
4// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +00005// RUN: | FileCheck -check-prefix=CHECK-ARM %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +00006// CHECK-ARM: as{{(.exe)?}}" "-mfloat-abi=soft"
Evgeniy Stepanov70cb3d62012-04-10 09:05:40 +00007//
8// RUN: %clang -target arm-linux -mcpu=cortex-a8 -### \
9// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000010// RUN: | FileCheck -check-prefix=CHECK-ARM-MCPU %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000011// CHECK-ARM-MCPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-mcpu=cortex-a8"
Evgeniy Stepanov70cb3d62012-04-10 09:05:40 +000012//
13// RUN: %clang -target arm-linux -mfpu=neon -### \
14// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000015// RUN: | FileCheck -check-prefix=CHECK-ARM-MFPU %s
Asiri Rathnayake9e3c7cb2014-10-03 09:11:41 +000016// CHECK-ARM-MFPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-mfpu=neon"
Evgeniy Stepanov70cb3d62012-04-10 09:05:40 +000017//
18// RUN: %clang -target arm-linux -march=armv7-a -### \
19// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000020// RUN: | FileCheck -check-prefix=CHECK-ARM-MARCH %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000021// CHECK-ARM-MARCH: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=armv7-a"
Evgeniy Stepanov70cb3d62012-04-10 09:05:40 +000022//
23// RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \
24// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000025// RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s
Asiri Rathnayake9e3c7cb2014-10-03 09:11:41 +000026// CHECK-ARM-ALL: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=armv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
Evgeniy Stepanov70cb3d62012-04-10 09:05:40 +000027//
Scott Douglass3205f522015-03-23 10:54:24 +000028// RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armebv7-a -### \
29// RUN: -no-integrated-as -c %s 2>&1 \
30// RUN: | FileCheck -check-prefix=CHECK-ARMEB-ALL %s
31// CHECK-ARMEB-ALL: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=armebv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
32//
33// RUN: %clang -target thumb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbv7-a -### \
34// RUN: -no-integrated-as -c %s 2>&1 \
35// RUN: | FileCheck -check-prefix=CHECK-THUMB-ALL %s
36// CHECK-THUMB-ALL: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=thumbv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
37//
38// RUN: %clang -target thumb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbebv7-a -### \
39// RUN: -no-integrated-as -c %s 2>&1 \
40// RUN: | FileCheck -check-prefix=CHECK-THUMBEB-ALL %s
41// CHECK-THUMBEB-ALL: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=thumbebv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
42//
Evgeniy Stepanov70cb3d62012-04-10 09:05:40 +000043// RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \
44// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000045// RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000046// CHECK-ARM-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
47//
Scott Douglass3205f522015-03-23 10:54:24 +000048// RUN: %clang -target armebv7-linux -mcpu=cortex-a8 -### \
49// RUN: -no-integrated-as -c %s 2>&1 \
50// RUN: | FileCheck -check-prefix=CHECK-ARMEB-TARGET %s
51// CHECK-ARMEB-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
52//
53// RUN: %clang -target thumbv7-linux -mcpu=cortex-a8 -### \
54// RUN: -no-integrated-as -c %s 2>&1 \
55// RUN: | FileCheck -check-prefix=CHECK-THUMB-TARGET %s
56// CHECK-THUMB-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
57//
58// RUN: %clang -target thumbebv7-linux -mcpu=cortex-a8 -### \
59// RUN: -no-integrated-as -c %s 2>&1 \
60// RUN: | FileCheck -check-prefix=CHECK-THUMBEB-TARGET %s
61// CHECK-THUMBEB-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
62//
Bernard Ogdena58ef052013-10-24 18:32:41 +000063// RUN: %clang -target armv8-linux -mcpu=cortex-a53 -### \
64// RUN: -no-integrated-as -c %s 2>&1 \
65// RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET-V8 %s
66// CHECK-ARM-TARGET-V8: as{{(.exe)?}}" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
67//
Scott Douglass3205f522015-03-23 10:54:24 +000068// RUN: %clang -target armebv8-linux -mcpu=cortex-a53 -### \
69// RUN: -no-integrated-as -c %s 2>&1 \
70// RUN: | FileCheck -check-prefix=CHECK-ARMEB-TARGET-V8 %s
71// CHECK-ARMEB-TARGET-V8: as{{(.exe)?}}" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
72//
73// RUN: %clang -target thumbv8-linux -mcpu=cortex-a53 -### \
74// RUN: -no-integrated-as -c %s 2>&1 \
75// RUN: | FileCheck -check-prefix=CHECK-THUMB-TARGET-V8 %s
76// CHECK-THUMB-TARGET-V8: as{{(.exe)?}}" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
77//
78// RUN: %clang -target thumbebv8-linux -mcpu=cortex-a53 -### \
79// RUN: -no-integrated-as -c %s 2>&1 \
80// RUN: | FileCheck -check-prefix=CHECK-THUMBEB-TARGET-V8 %s
81// CHECK-THUMBEB-TARGET-V8: as{{(.exe)?}}" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
82//
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000083// RUN: %clang -target arm-linux -mfloat-abi=hard -### \
84// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000085// RUN: | FileCheck -check-prefix=CHECK-ARM-MFLOAT-ABI %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000086// CHECK-ARM-MFLOAT-ABI: as{{(.exe)?}}" "-mfloat-abi=hard"
87//
88// RUN: %clang -target arm-linux-androideabi -### \
89// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000090// RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000091// CHECK-ARM-ANDROID: as{{(.exe)?}}" "-mfloat-abi=soft"
92//
93// RUN: %clang -target arm-linux-androideabi -march=armv7-a -### \
94// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000095// RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID-SOFTFP %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000096// CHECK-ARM-ANDROID-SOFTFP: as{{(.exe)?}}" "-mfloat-abi=softfp" "-march=armv7-a"
97//
98// RUN: %clang -target arm-linux-eabi -mhard-float -### \
99// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +0000100// RUN: | FileCheck -check-prefix=CHECK-ARM-HARDFP %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +0000101// CHECK-ARM-HARDFP: as{{(.exe)?}}" "-mfloat-abi=hard"
Evgeniy Stepanov582911a2012-04-24 09:05:31 +0000102//
Manoj Guptabb75b352017-04-18 17:36:10 +0000103// RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -### \
104// RUN: -no-integrated-as -c %s 2>&1 \
105// RUN: | FileCheck -check-prefix=CHECK-ARM64-MCPU %s
106// CHECK-ARM64-MCPU: as{{(.exe)?}}" "-mcpu=cortex-a53"
107//
108// RUN: %clang -target aarch64-linux-gnu -march=armv8-a -### \
109// RUN: -no-integrated-as -c %s 2>&1 \
110// RUN: | FileCheck -check-prefix=CHECK-ARM64-MARCH %s
111// CHECK-ARM64-MARCH: as{{(.exe)?}}" "-march=armv8-a"
112//
113// RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -march=armv8-a -### \
114// RUN: -no-integrated-as -c %s 2>&1 \
115// RUN: | FileCheck -check-prefix=CHECK-ARM64-ALL %s
116// CHECK-ARM64-ALL: as{{(.exe)?}}" "-march=armv8-a" "-mcpu=cortex-a53"
117//
118// RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -### \
119// RUN: -no-integrated-as -c %s 2>&1 \
120// RUN: | FileCheck -check-prefix=CHECK-ARM64-MCPU %s
121//
122// RUN: %clang -target aarch64_be-linux-gnu -march=armv8-a -### \
123// RUN: -no-integrated-as -c %s 2>&1 \
124// RUN: | FileCheck -check-prefix=CHECK-ARM64-MARCH %s
125//
126// RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -march=armv8-a -### \
127// RUN: -no-integrated-as -c %s 2>&1 \
128// RUN: | FileCheck -check-prefix=CHECK-ARM64-ALL %s
129//
Evgeniy Stepanov582911a2012-04-24 09:05:31 +0000130// RUN: %clang -target ppc-linux -mcpu=invalid-cpu -### \
131// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +0000132// RUN: | FileCheck -check-prefix=CHECK-PPC-NO-MCPU %s
Evgeniy Stepanov582911a2012-04-24 09:05:31 +0000133// CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu"
Richard Sandiford4652d892013-07-19 16:51:51 +0000134//
Jakob Stoklund Olesen2490e552014-01-10 03:51:29 +0000135// RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
136// RUN: -no-integrated-as -c %s 2>&1 \
137// RUN: | FileCheck -check-prefix=CHECK-SPARCV9 %s
138// CHECK-SPARCV9: as
139// CHECK-SPARCV9: -64
Joerg Sonnenberger5c1ac902015-11-10 00:40:29 +0000140// CHECK-SPARCV9: -Av9
Jakob Stoklund Olesen8d7f5062014-01-12 04:53:36 +0000141// CHECK-SPARCV9-NOT: -KPIC
Jakob Stoklund Olesen2490e552014-01-10 03:51:29 +0000142// CHECK-SPARCV9: -o
143//
Jakob Stoklund Olesen8d7f5062014-01-12 04:53:36 +0000144// RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
145// RUN: -no-integrated-as -fpic -c %s 2>&1 \
146// RUN: | FileCheck -check-prefix=CHECK-SPARCV9PIC %s
147// CHECK-SPARCV9PIC: as
148// CHECK-SPARCV9PIC: -64
Joerg Sonnenberger5c1ac902015-11-10 00:40:29 +0000149// CHECK-SPARCV9PIC: -Av9
Jakob Stoklund Olesen8d7f5062014-01-12 04:53:36 +0000150// CHECK-SPARCV9PIC: -KPIC
151// CHECK-SPARCV9PIC: -o
152//
Jakob Stoklund Olesen2490e552014-01-10 03:51:29 +0000153// RUN: %clang -target sparc-linux -mcpu=invalid-cpu -### \
154// RUN: -no-integrated-as -c %s 2>&1 \
155// RUN: | FileCheck -check-prefix=CHECK-SPARCV8 %s
156// CHECK-SPARCV8: as
157// CHECK-SPARCV8: -32
Joerg Sonnenberger5c1ac902015-11-10 00:40:29 +0000158// CHECK-SPARCV8: -Av8
Jakob Stoklund Olesen2490e552014-01-10 03:51:29 +0000159// CHECK-SPARCV8: -o
160//
Douglas Katzmanf36dddf2015-05-11 15:21:44 +0000161// RUN: %clang -target sparcel-linux -mcpu=invalid-cpu -### \
162// RUN: -no-integrated-as -c %s 2>&1 \
163// RUN: | FileCheck -check-prefix=CHECK-SPARCV8EL %s
164// CHECK-SPARCV8EL: as
165// CHECK-SPARCV8EL: -32
Joerg Sonnenberger5c1ac902015-11-10 00:40:29 +0000166// CHECK-SPARCV8EL: -Av8
Douglas Katzmanf36dddf2015-05-11 15:21:44 +0000167// CHECK-SPARCV8EL: -o
168//
Richard Sandiford4652d892013-07-19 16:51:51 +0000169// RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +0000170// RUN: | FileCheck -check-prefix=CHECK-Z-DEFAULT-ARCH %s
Richard Sandiford4652d892013-07-19 16:51:51 +0000171// CHECK-Z-DEFAULT-ARCH: as{{.*}} "-march=z10"
172//
173// RUN: %clang -target s390x-linux -march=z196 -### \
174// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +0000175// RUN: | FileCheck -check-prefix=CHECK-Z-ARCH-Z196 %s
Richard Sandiford4652d892013-07-19 16:51:51 +0000176// CHECK-Z-ARCH-Z196: as{{.*}} "-march=z196"
Nemanja Ivanovicf88f81c2017-07-27 08:58:28 +0000177//
178// RUN: %clang -target powerpc64le-linux -### \
179// RUN: -no-integrated-as -c %s 2>&1 \
180// RUN: | FileCheck -check-prefix=CHECK-PPC64LE %s
181// CHECK-PPC64LE: as{{.*}} "-mpower8"
182//
183// RUN: %clang -target powerpc64-linux -mcpu=pwr7 -### \
184// RUN: -no-integrated-as -c %s 2>&1 \
185// RUN: | FileCheck -check-prefix=CHECK-PPC64 %s
186// CHECK-PPC64: as{{.*}} "-mpower7"
187//
188// RUN: %clang -target powerpc-linux -mcpu=pwr9 -### \
189// RUN: -no-integrated-as -c %s 2>&1 \
190// RUN: | FileCheck -check-prefix=CHECK-PPC32 %s
191// CHECK-PPC32: as{{.*}} "-mpower9"