Richard Sandiford | 5c92b9a | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 1 | // Check passing options to the assembler for various linux targets. |
Evgeniy Stepanov | e9b4d98 | 2012-04-10 09:05:40 +0000 | [diff] [blame] | 2 | // |
| 3 | // RUN: %clang -target arm-linux -### \ |
| 4 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 5 | // RUN: | FileCheck -check-prefix=CHECK-ARM %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 6 | // CHECK-ARM: as{{(.exe)?}}" "-mfloat-abi=soft" |
Evgeniy Stepanov | e9b4d98 | 2012-04-10 09:05:40 +0000 | [diff] [blame] | 7 | // |
| 8 | // RUN: %clang -target arm-linux -mcpu=cortex-a8 -### \ |
| 9 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 10 | // RUN: | FileCheck -check-prefix=CHECK-ARM-MCPU %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 11 | // CHECK-ARM-MCPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-mcpu=cortex-a8" |
Evgeniy Stepanov | e9b4d98 | 2012-04-10 09:05:40 +0000 | [diff] [blame] | 12 | // |
| 13 | // RUN: %clang -target arm-linux -mfpu=neon -### \ |
| 14 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 15 | // RUN: | FileCheck -check-prefix=CHECK-ARM-MFPU %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 16 | // CHECK-ARM-MFPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-mfpu=neon" |
Evgeniy Stepanov | e9b4d98 | 2012-04-10 09:05:40 +0000 | [diff] [blame] | 17 | // |
| 18 | // RUN: %clang -target arm-linux -march=armv7-a -### \ |
| 19 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 20 | // RUN: | FileCheck -check-prefix=CHECK-ARM-MARCH %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 21 | // CHECK-ARM-MARCH: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=armv7-a" |
Evgeniy Stepanov | e9b4d98 | 2012-04-10 09:05:40 +0000 | [diff] [blame] | 22 | // |
| 23 | // RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \ |
| 24 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 25 | // RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 26 | // CHECK-ARM-ALL: as{{(.exe)?}}" "-mfloat-abi=soft" "-march=armv7-a" "-mcpu=cortex-a8" "-mfpu=neon" |
Evgeniy Stepanov | e9b4d98 | 2012-04-10 09:05:40 +0000 | [diff] [blame] | 27 | // |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 28 | // 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 Stepanov | e9b4d98 | 2012-04-10 09:05:40 +0000 | [diff] [blame] | 43 | // RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \ |
| 44 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 45 | // RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 46 | // CHECK-ARM-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8" |
| 47 | // |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 48 | // 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 Ogden | 80e90c2 | 2013-10-24 18:32:41 +0000 | [diff] [blame] | 63 | // 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 | // |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 68 | // 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 Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 83 | // RUN: %clang -target arm-linux -mfloat-abi=hard -### \ |
| 84 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 85 | // RUN: | FileCheck -check-prefix=CHECK-ARM-MFLOAT-ABI %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 86 | // 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 Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 90 | // RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 91 | // 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 Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 95 | // RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID-SOFTFP %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 96 | // 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 Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 100 | // RUN: | FileCheck -check-prefix=CHECK-ARM-HARDFP %s |
Evgeniy Stepanov | 700c508 | 2012-04-20 09:03:40 +0000 | [diff] [blame] | 101 | // CHECK-ARM-HARDFP: as{{(.exe)?}}" "-mfloat-abi=hard" |
Evgeniy Stepanov | eca187e | 2012-04-24 09:05:31 +0000 | [diff] [blame] | 102 | // |
| 103 | // RUN: %clang -target ppc-linux -mcpu=invalid-cpu -### \ |
| 104 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 105 | // RUN: | FileCheck -check-prefix=CHECK-PPC-NO-MCPU %s |
Evgeniy Stepanov | eca187e | 2012-04-24 09:05:31 +0000 | [diff] [blame] | 106 | // CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu" |
Richard Sandiford | 5c92b9a | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 107 | // |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 108 | // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \ |
| 109 | // RUN: -no-integrated-as -c %s 2>&1 \ |
| 110 | // RUN: | FileCheck -check-prefix=CHECK-SPARCV9 %s |
| 111 | // CHECK-SPARCV9: as |
| 112 | // CHECK-SPARCV9: -64 |
| 113 | // CHECK-SPARCV9: -Av9a |
| 114 | // CHECK-SPARCV9-NOT: -KPIC |
| 115 | // CHECK-SPARCV9: -o |
| 116 | // |
| 117 | // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \ |
| 118 | // RUN: -no-integrated-as -fpic -c %s 2>&1 \ |
| 119 | // RUN: | FileCheck -check-prefix=CHECK-SPARCV9PIC %s |
| 120 | // CHECK-SPARCV9PIC: as |
| 121 | // CHECK-SPARCV9PIC: -64 |
| 122 | // CHECK-SPARCV9PIC: -Av9a |
| 123 | // CHECK-SPARCV9PIC: -KPIC |
| 124 | // CHECK-SPARCV9PIC: -o |
| 125 | // |
| 126 | // RUN: %clang -target sparc-linux -mcpu=invalid-cpu -### \ |
| 127 | // RUN: -no-integrated-as -c %s 2>&1 \ |
| 128 | // RUN: | FileCheck -check-prefix=CHECK-SPARCV8 %s |
| 129 | // CHECK-SPARCV8: as |
| 130 | // CHECK-SPARCV8: -32 |
| 131 | // CHECK-SPARCV8: -Av8plusa |
| 132 | // CHECK-SPARCV8: -o |
| 133 | // |
Richard Sandiford | 5c92b9a | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 134 | // RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 135 | // RUN: | FileCheck -check-prefix=CHECK-Z-DEFAULT-ARCH %s |
Richard Sandiford | 5c92b9a | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 136 | // CHECK-Z-DEFAULT-ARCH: as{{.*}} "-march=z10" |
| 137 | // |
| 138 | // RUN: %clang -target s390x-linux -march=z196 -### \ |
| 139 | // RUN: -no-integrated-as -c %s 2>&1 \ |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 140 | // RUN: | FileCheck -check-prefix=CHECK-Z-ARCH-Z196 %s |
Richard Sandiford | 5c92b9a | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 141 | // CHECK-Z-ARCH-Z196: as{{.*}} "-march=z196" |