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" 12 // 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" 17 // 18 // RUN: %clang -target arm-linux -march=armv7-a -### \ 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 // 23 // RUN: %clang -target armeb-linux -mlittle-endian -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \ 24 // RUN: -no-integrated-as -c %s 2>&1 \ 25 // RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s 26 // CHECK-ARM-ALL: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft" "-march=armv7-a" "-mcpu=cortex-a8" "-mfpu=neon" 27 // 28 // RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \ 29 // RUN: -no-integrated-as -c %s 2>&1 \ 30 // RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s 31 // 32 // RUN: %clang -target armeb-linux -mlittle-endian -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \ 33 // RUN: -no-integrated-as -c %s 2>&1 \ 34 // RUN: | FileCheck -check-prefix=CHECK-ARM-ALL %s 35 // 36 // RUN: %clang -target armeb-linux -mcpu=cortex-a8 -mfpu=neon -march=armebv7-a -### \ 37 // RUN: -no-integrated-as -c %s 2>&1 \ 38 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-ALL %s 39 // CHECK-ARMEB-ALL: as{{(.exe)?}}" "-EB" "-mfloat-abi=soft" "-march=armebv7-a" "-mcpu=cortex-a8" "-mfpu=neon" 40 // 41 // RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armebv7-a -mbig-endian -### \ 42 // RUN: -no-integrated-as -c %s 2>&1 \ 43 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-ALL %s 44 // 45 // RUN: %clang -target thumb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbv7-a -### \ 46 // RUN: -no-integrated-as -c %s 2>&1 \ 47 // RUN: | FileCheck -check-prefix=CHECK-THUMB-ALL %s 48 // CHECK-THUMB-ALL: as{{(.exe)?}}" "-EL" "-mfloat-abi=soft" "-march=thumbv7-a" "-mcpu=cortex-a8" "-mfpu=neon" 49 // 50 // RUN: %clang -target thumbeb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbv7-a -mlittle-endian -### \ 51 // RUN: -no-integrated-as -c %s 2>&1 \ 52 // RUN: | FileCheck -check-prefix=CHECK-THUMB-ALL %s 53 // 54 // RUN: %clang -target thumbeb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbebv7-a -### \ 55 // RUN: -no-integrated-as -c %s 2>&1 \ 56 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-ALL %s 57 // CHECK-THUMBEB-ALL: as{{(.exe)?}}" "-EB" "-mfloat-abi=soft" "-march=thumbebv7-a" "-mcpu=cortex-a8" "-mfpu=neon" 58 // 59 // RUN: %clang -target thumb-linux -mcpu=cortex-a8 -mfpu=neon -march=thumbebv7-a -mbig-endian -### \ 60 // RUN: -no-integrated-as -c %s 2>&1 \ 61 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-ALL %s 62 // 63 // RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \ 64 // RUN: -no-integrated-as -c %s 2>&1 \ 65 // RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET %s 66 // CHECK-ARM-TARGET: as{{(.exe)?}}" "-EL" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8" 67 // 68 // RUN: %clang -target armebv7-linux -mcpu=cortex-a8 -### \ 69 // RUN: -no-integrated-as -c %s 2>&1 \ 70 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-TARGET %s 71 // CHECK-ARMEB-TARGET: as{{(.exe)?}}" "-EB" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8" 72 // 73 // RUN: %clang -target thumbv7-linux -mcpu=cortex-a8 -### \ 74 // RUN: -no-integrated-as -c %s 2>&1 \ 75 // RUN: | FileCheck -check-prefix=CHECK-THUMB-TARGET %s 76 // CHECK-THUMB-TARGET: as{{(.exe)?}}" "-EL" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8" 77 // 78 // RUN: %clang -target thumbebv7-linux -mcpu=cortex-a8 -### \ 79 // RUN: -no-integrated-as -c %s 2>&1 \ 80 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-TARGET %s 81 // CHECK-THUMBEB-TARGET: as{{(.exe)?}}" "-EB" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8" 82 // 83 // RUN: %clang -target armv8-linux -mcpu=cortex-a53 -### \ 84 // RUN: -no-integrated-as -c %s 2>&1 \ 85 // RUN: | FileCheck -check-prefix=CHECK-ARM-TARGET-V8 %s 86 // CHECK-ARM-TARGET-V8: as{{(.exe)?}}" "-EL" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53" 87 // 88 // RUN: %clang -target armebv8-linux -mcpu=cortex-a53 -### \ 89 // RUN: -no-integrated-as -c %s 2>&1 \ 90 // RUN: | FileCheck -check-prefix=CHECK-ARMEB-TARGET-V8 %s 91 // CHECK-ARMEB-TARGET-V8: as{{(.exe)?}}" "-EB" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53" 92 // 93 // RUN: %clang -target thumbv8-linux -mcpu=cortex-a53 -### \ 94 // RUN: -no-integrated-as -c %s 2>&1 \ 95 // RUN: | FileCheck -check-prefix=CHECK-THUMB-TARGET-V8 %s 96 // CHECK-THUMB-TARGET-V8: as{{(.exe)?}}" "-EL" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53" 97 // 98 // RUN: %clang -target thumbebv8-linux -mcpu=cortex-a53 -### \ 99 // RUN: -no-integrated-as -c %s 2>&1 \ 100 // RUN: | FileCheck -check-prefix=CHECK-THUMBEB-TARGET-V8 %s 101 // CHECK-THUMBEB-TARGET-V8: as{{(.exe)?}}" "-EB" "-mfpu=crypto-neon-fp-armv8" "-mfloat-abi=soft" "-mcpu=cortex-a53" 102 // 103 // RUN: %clang -target arm-linux -mfloat-abi=hard -### \ 104 // RUN: -no-integrated-as -c %s 2>&1 \ 105 // RUN: | FileCheck -check-prefix=CHECK-ARM-MFLOAT-ABI %s 106 // CHECK-ARM-MFLOAT-ABI: as{{(.exe)?}}" "-EL" "-mfloat-abi=hard" 107 // 108 // RUN: %clang -target arm-linux-androideabi -### \ 109 // RUN: -no-integrated-as -c %s 2>&1 \ 110 // RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID %s 111 // CHECK-ARM-ANDROID: as{{(.exe)?}}" "--noexecstack" "-EL" "-mfloat-abi=soft" 112 // 113 // RUN: %clang -target arm-linux-androideabi -march=armv7-a -### \ 114 // RUN: -no-integrated-as -c %s 2>&1 \ 115 // RUN: | FileCheck -check-prefix=CHECK-ARM-ANDROID-SOFTFP %s 116 // CHECK-ARM-ANDROID-SOFTFP: as{{(.exe)?}}" "--noexecstack" "-EL" "-mfloat-abi=softfp" "-march=armv7-a" 117 // 118 // RUN: %clang -target arm-linux-eabi -mhard-float -### \ 119 // RUN: -no-integrated-as -c %s 2>&1 \ 120 // RUN: | FileCheck -check-prefix=CHECK-ARM-HARDFP %s 121 // CHECK-ARM-HARDFP: as{{(.exe)?}}" "-EL" "-mfloat-abi=hard" 122 // 123 // RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -### \ 124 // RUN: -no-integrated-as -c %s 2>&1 \ 125 // RUN: | FileCheck -check-prefix=CHECK-ARM64-MCPU %s 126 // CHECK-ARM64-MCPU: as{{(.exe)?}}" "-EL" "-mcpu=cortex-a53" 127 // 128 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a -### \ 129 // RUN: -no-integrated-as -c %s 2>&1 \ 130 // RUN: | FileCheck -check-prefix=CHECK-ARM64-MARCH %s 131 // CHECK-ARM64-MARCH: as{{(.exe)?}}" "-EL" "-march=armv8-a" 132 // 133 // RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -march=armv8-a -### \ 134 // RUN: -no-integrated-as -c %s 2>&1 \ 135 // RUN: | FileCheck -check-prefix=CHECK-ARM64-ALL %s 136 // CHECK-ARM64-ALL: as{{(.exe)?}}" "-EL" "-march=armv8-a" "-mcpu=cortex-a53" 137 // 138 // RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -march=armv8-a -mlittle-endian -### \ 139 // RUN: -no-integrated-as -c %s 2>&1 \ 140 // RUN: | FileCheck -check-prefix=CHECK-ARM64-ALL %s 141 // 142 // RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -### \ 143 // RUN: -no-integrated-as -c %s 2>&1 \ 144 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-MCPU %s 145 // CHECK-ARM64BE-MCPU: as{{(.exe)?}}" "-EB" "-mcpu=cortex-a53" 146 // 147 // RUN: %clang -target aarch64_be-linux-gnu -march=armv8-a -### \ 148 // RUN: -no-integrated-as -c %s 2>&1 \ 149 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-MARCH %s 150 // CHECK-ARM64BE-MARCH: as{{(.exe)?}}" "-EB" "-march=armv8-a" 151 // 152 // RUN: %clang -target aarch64_be-linux-gnu -mcpu=cortex-a53 -march=armv8-a -### \ 153 // RUN: -no-integrated-as -c %s 2>&1 \ 154 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-ALL %s 155 // CHECK-ARM64BE-ALL: as{{(.exe)?}}" "-EB" "-march=armv8-a" "-mcpu=cortex-a53" 156 // 157 // RUN: %clang -target aarch64-linux-gnu -mcpu=cortex-a53 -march=armv8-a -mbig-endian -### \ 158 // RUN: -no-integrated-as -c %s 2>&1 \ 159 // RUN: | FileCheck -check-prefix=CHECK-ARM64BE-ALL %s 160 // 161 // RUN: %clang -target ppc-linux -mcpu=invalid-cpu -### \ 162 // RUN: -no-integrated-as -c %s 2>&1 \ 163 // RUN: | FileCheck -check-prefix=CHECK-PPC-NO-MCPU %s 164 // CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu" 165 // 166 // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \ 167 // RUN: -no-integrated-as -c %s 2>&1 \ 168 // RUN: | FileCheck -check-prefix=CHECK-SPARCV9 %s 169 // CHECK-SPARCV9: as 170 // CHECK-SPARCV9: -64 171 // CHECK-SPARCV9: -Av9a 172 // CHECK-SPARCV9-NOT: -KPIC 173 // CHECK-SPARCV9: -o 174 // 175 // RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \ 176 // RUN: -no-integrated-as -fpic -c %s 2>&1 \ 177 // RUN: | FileCheck -check-prefix=CHECK-SPARCV9PIC %s 178 // CHECK-SPARCV9PIC: as 179 // CHECK-SPARCV9PIC: -64 180 // CHECK-SPARCV9PIC: -Av9a 181 // CHECK-SPARCV9PIC: -KPIC 182 // CHECK-SPARCV9PIC: -o 183 // 184 // RUN: %clang -target sparc-linux -mcpu=invalid-cpu -### \ 185 // RUN: -no-integrated-as -c %s 2>&1 \ 186 // RUN: | FileCheck -check-prefix=CHECK-SPARCV8 %s 187 // CHECK-SPARCV8: as 188 // CHECK-SPARCV8: -32 189 // CHECK-SPARCV8: -Av8 190 // CHECK-SPARCV8: -o 191 // 192 // RUN: %clang -target sparcel-linux -mcpu=invalid-cpu -### \ 193 // RUN: -no-integrated-as -c %s 2>&1 \ 194 // RUN: | FileCheck -check-prefix=CHECK-SPARCV8EL %s 195 // CHECK-SPARCV8EL: as 196 // CHECK-SPARCV8EL: -32 197 // CHECK-SPARCV8EL: -Av8 198 // CHECK-SPARCV8EL: -o 199 // 200 // RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \ 201 // RUN: | FileCheck -check-prefix=CHECK-Z-DEFAULT-ARCH %s 202 // CHECK-Z-DEFAULT-ARCH: as{{.*}} "-march=z10" 203 // 204 // RUN: %clang -target s390x-linux -march=z196 -### \ 205 // RUN: -no-integrated-as -c %s 2>&1 \ 206 // RUN: | FileCheck -check-prefix=CHECK-Z-ARCH-Z196 %s 207 // CHECK-Z-ARCH-Z196: as{{.*}} "-march=z196" 208 // 209 // RUN: %clang -target powerpc64le-linux -### \ 210 // RUN: -no-integrated-as -c %s 2>&1 \ 211 // RUN: | FileCheck -check-prefix=CHECK-PPC64LE %s 212 // CHECK-PPC64LE: as{{.*}} "-mpower8" 213 // 214 // RUN: %clang -target powerpc64-linux -mcpu=pwr7 -### \ 215 // RUN: -no-integrated-as -c %s 2>&1 \ 216 // RUN: | FileCheck -check-prefix=CHECK-PPC64 %s 217 // CHECK-PPC64: as{{.*}} "-mpower7" 218 // 219 // RUN: %clang -target powerpc-linux -mcpu=pwr9 -### \ 220 // RUN: -no-integrated-as -c %s 2>&1 \ 221 // RUN: | FileCheck -check-prefix=CHECK-PPC32 %s 222 // CHECK-PPC32: as{{.*}} "-mpower9" 223