blob: a449b7b6538058fa11050925dbcb3c24c86b2206 [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
Evgeniy Stepanoved943f62012-04-20 09:03:40 +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
Evgeniy Stepanoved943f62012-04-20 09:03:40 +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//
28// RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \
29// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000030// RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000031// CHECK-ARM-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
32//
Bernard Ogdena58ef052013-10-24 18:32:41 +000033// RUN: %clang -target armv8-linux -mcpu=cortex-a53 -### \
34// RUN: -no-integrated-as -c %s 2>&1 \
35// RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET-V8 %s
36// CHECK-ARM-TARGET-V8: as{{(.exe)?}}" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53"
37//
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000038// RUN: %clang -target arm-linux -mfloat-abi=hard -### \
39// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000040// RUN: | FileCheck -check-prefix=CHECK-ARM-MFLOAT-ABI %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000041// CHECK-ARM-MFLOAT-ABI: as{{(.exe)?}}" "-mfloat-abi=hard"
42//
43// RUN: %clang -target arm-linux-androideabi -### \
44// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000045// RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000046// CHECK-ARM-ANDROID: as{{(.exe)?}}" "-mfloat-abi=soft"
47//
48// RUN: %clang -target arm-linux-androideabi -march=armv7-a -### \
49// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000050// RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID-SOFTFP %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000051// CHECK-ARM-ANDROID-SOFTFP: as{{(.exe)?}}" "-mfloat-abi=softfp" "-march=armv7-a"
52//
53// RUN: %clang -target arm-linux-eabi -mhard-float -### \
54// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000055// RUN: | FileCheck -check-prefix=CHECK-ARM-HARDFP %s
Evgeniy Stepanoved943f62012-04-20 09:03:40 +000056// CHECK-ARM-HARDFP: as{{(.exe)?}}" "-mfloat-abi=hard"
Evgeniy Stepanov582911a2012-04-24 09:05:31 +000057//
58// RUN: %clang -target ppc-linux -mcpu=invalid-cpu -### \
59// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000060// RUN: | FileCheck -check-prefix=CHECK-PPC-NO-MCPU %s
Evgeniy Stepanov582911a2012-04-24 09:05:31 +000061// CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu"
Richard Sandiford4652d892013-07-19 16:51:51 +000062//
63// RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000064// RUN: | FileCheck -check-prefix=CHECK-Z-DEFAULT-ARCH %s
Richard Sandiford4652d892013-07-19 16:51:51 +000065// CHECK-Z-DEFAULT-ARCH: as{{.*}} "-march=z10"
66//
67// RUN: %clang -target s390x-linux -march=z196 -### \
68// RUN: -no-integrated-as -c %s 2>&1 \
Tim Northover19ae1172013-08-12 12:51:05 +000069// RUN: | FileCheck -check-prefix=CHECK-Z-ARCH-Z196 %s
Richard Sandiford4652d892013-07-19 16:51:51 +000070// CHECK-Z-ARCH-Z196: as{{.*}} "-march=z196"