brintos

brintos / llvm-project-archived public Read only

0
0
Text · 71.7 KiB · 689cd81 Raw
1062 lines · c
1// RUN: %clang -target armv8a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8A %s2// CHECK-V8A: #define __ARMEL__ 13// CHECK-V8A: #define __ARM_ARCH 84// CHECK-V8A: #define __ARM_ARCH_8A__ 15// CHECK-V8A: #define __ARM_FEATURE_CRC32 16// CHECK-V8A: #define __ARM_FEATURE_DIRECTED_ROUNDING 17// CHECK-V8A: #define __ARM_FEATURE_NUMERIC_MAXMIN 18// CHECK-V8A-NOT: #define __ARM_FP 0x9// CHECK-V8A-NOT: #define __ARM_FEATURE_DOTPROD10// CHECK-V8A-NOT: #define __ARM_BF16_FORMAT_ALTERNATIVE11// CHECK-V8A-NOT: #define __ARM_FEATURE_BF1612// CHECK-V8A-NOT: #define __ARM_FEATURE_BF16_VECTOR_ARITHMETIC13 14// RUN: %clang -target armv8a-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8A-ALLOW-FP-INSTR %s15// RUN: %clang -target armv8a-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8A-ALLOW-FP-INSTR %s16// CHECK-V8A-ALLOW-FP-INSTR: #define __ARMEL__ 117// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_ARCH 818// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_ARCH_8A__ 119// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_CRC32 120// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_DIRECTED_ROUNDING 121// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_NUMERIC_MAXMIN 122// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP 0xe23// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP16_ARGS 124// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP16_FORMAT_IEEE 125// CHECK-V8A-ALLOW-FP-INSTR-V8A-NOT: #define __ARM_FEATURE_DOTPROD26 27// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s28// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s29// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s30// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s31// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s32// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s33// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s34// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s35// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s36// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s37// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 138// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 139// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FP 0xe40// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FP16_FORMAT_IEEE 141 42// +fp16fml without neon doesn't make sense as the fp16fml instructions all require SIMD.43// However, as +fp16fml implies +fp16 there is a set of defines that we would expect.44// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16fml -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s45// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s46// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16fml -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s47// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s48// CHECK-FULLFP16-SCALAR:       #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 149// CHECK-FULLFP16-SCALAR-NOT:   #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 150// CHECK-FULLFP16-SCALAR:       #define __ARM_FP 0xe51// CHECK-FULLFP16-SCALAR:       #define __ARM_FP16_FORMAT_IEEE 152 53// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s54// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s55// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s56// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+fp16fml+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s57// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s58// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s59// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s60// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16fml+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s61// CHECK-FULLFP16-NOFML-VECTOR-SCALAR-NOT: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 162// CHECK-FULLFP16-NOFML-VECTOR-SCALAR-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 163// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP 0xe64// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP16_FORMAT_IEEE 165 66// RUN: %clang -target arm -march=armv8-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s67// RUN: %clang -target arm -march=armv8-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s68// RUN: %clang -target arm -march=armv8-a+fp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s69// RUN: %clang -target arm -march=armv8-a+fp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s70// RUN: %clang -target arm -march=armv8.4-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s71// RUN: %clang -target arm -march=armv8.4-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s72// RUN: %clang -target arm -march=armv8.4-a+fp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s73// RUN: %clang -target arm -march=armv8.4-a+fp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s74// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC75// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC76// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC77// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC78 79// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2a+dotprod -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-DOTPROD %s80// CHECK-DOTPROD: #define __ARM_FEATURE_DOTPROD 181 82// RUN: %clang -target armv8r-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R %s83// CHECK-V8R: #define __ARMEL__ 184// CHECK-V8R: #define __ARM_ARCH 885// CHECK-V8R: #define __ARM_ARCH_8R__ 186// CHECK-V8R: #define __ARM_FEATURE_CRC32 187// CHECK-V8R: #define __ARM_FEATURE_DIRECTED_ROUNDING 188// CHECK-V8R: #define __ARM_FEATURE_NUMERIC_MAXMIN 189// CHECK-V8R-NOT: #define __ARM_FP 0x90 91// RUN: %clang -target armv8r-none-linux-gnueabi -mcpu=cortex-r52 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R-ALLOW-FP-INSTR %s92// RUN: %clang -target armv8r-none-linux-gnueabihf -mcpu=cortex-r52 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R-ALLOW-FP-INSTR %s93// CHECK-V8R-ALLOW-FP-INSTR: #define __ARMEL__ 194// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_ARCH 895// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_ARCH_8R__ 196// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_CRC32 197// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_DIRECTED_ROUNDING 198// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_NUMERIC_MAXMIN 199// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FP 0xe100 101// RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7 %s102// CHECK-V7: #define __ARMEL__ 1103// CHECK-V7: #define __ARM_ARCH 7104// CHECK-V7: #define __ARM_ARCH_7A__ 1105// CHECK-V7-NOT: __ARM_FEATURE_CRC32106// CHECK-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN107// CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING108// CHECK-V7-NOT: #define __ARM_FP 0x109 110// RUN: %clang -target armv7a-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7-ALLOW-FP-INSTR %s111// RUN: %clang -target armv7a-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7-ALLOW-FP-INSTR %s112// CHECK-V7-ALLOW-FP-INSTR: #define __ARMEL__ 1113// CHECK-V7-ALLOW-FP-INSTR: #define __ARM_ARCH 7114// CHECK-V7-ALLOW-FP-INSTR: #define __ARM_ARCH_7A__ 1115// CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32116// CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_NUMERIC_MAXMIN117// CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_DIRECTED_ROUNDING118// CHECK-V7-ALLOW-FP-INSTR: #define __ARM_FP 0xc119 120// RUN: %clang -target armv7ve-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE %s121// CHECK-V7VE: #define __ARMEL__ 1122// CHECK-V7VE: #define __ARM_ARCH 7123// CHECK-V7VE: #define __ARM_ARCH_7VE__ 1124// CHECK-V7VE: #define __ARM_ARCH_EXT_IDIV__ 1125// CHECK-V7VE-NOT: #define __ARM_FP 0x126 127// RUN: %clang -target armv7ve-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE-DEFAULT-ABI-SOFT %s128// RUN: %clang -target armv7ve-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE-DEFAULT-ABI-SOFT %s129// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARMEL__ 1130// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH 7131// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH_7VE__ 1132// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH_EXT_IDIV__ 1133// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_FP 0xc134 135// RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-DARWIN-V7 %s136// CHECK-DARWIN-V7: #define __ARMEL__ 1137// CHECK-DARWIN-V7: #define __ARM_ARCH 7138// CHECK-DARWIN-V7: #define __ARM_ARCH_7A__ 1139// CHECK-DARWIN-V7-NOT: __ARM_FEATURE_CRC32140// CHECK-DARWIN-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN141// CHECK-DARWIN-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING142// CHECK-DARWIN-V7: #define __ARM_FP 0xc143// CHECK-DARWIN-V7: #define __ARM_NEON 1144// CHECK-DARWIN-V7: #define __ARM_NEON_FP 0x4145// CHECK-DARWIN-V7: #define __ARM_NEON__ 1146 147// RUN: %clang -target armv7-windows -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-WINDOWS-V7 %s148// CHECK-WINDOWS-V7: #define __ARMEL__ 1149// CHECK-WINDOWS-V7: #define __ARM_ARCH 7150// CHECK-WINDOWS-V7: #define __ARM_ARCH_7A__ 1151// CHECK-WINDOWS-V7-NOT: __ARM_FEATURE_CRC32152// CHECK-WINDOWS-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN153// CHECK-WINDOWS-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING154// CHECK-WINDOWS-V7: #define __ARM_FP 0xe155// CHECK-WINDOWS-V7: #define __ARM_NEON 1156// CHECK-WINDOWS-V7: #define __ARM_NEON_FP 0x6157// CHECK-WINDOWS-V7: #define __ARM_NEON__ 1158 159// RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7S %s160// CHECK-V7S: #define __ARMEL__ 1161// CHECK-V7S: #define __ARM_ARCH 7162// CHECK-V7S: #define __ARM_ARCH_7S__ 1163// CHECK-V7S-NOT: __ARM_FEATURE_CRC32164// CHECK-V7S-NOT: __ARM_FEATURE_NUMERIC_MAXMIN165// CHECK-V7S-NOT: __ARM_FEATURE_DIRECTED_ROUNDING166// CHECK-V7S: #define __ARM_FP 0xe167// CHECK-V7S: #define __ARM_NEON 1168// CHECK-V7S: #define __ARM_NEON_FP 0x6169// CHECK-V7S: #define __ARM_NEON__ 1170 171// RUN: %clang -target arm-arm-none-eabi -march=armv7-m -mfloat-abi=soft -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-VFP-FP %s172// RUN: %clang -target arm-arm-none-eabi -march=armv7-m -mfloat-abi=softfp -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-VFP-FP %s173// RUN: %clang -target arm-arm-none-eabi -march=armv7-m -mfloat-abi=hard -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-VFP-FP %s174// CHECK-VFP-FP: #define __VFP_FP__ 1175 176// RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF %s177// CHECK-V8-BAREHF: #define __ARMEL__ 1178// CHECK-V8-BAREHF: #define __ARM_ARCH 8179// CHECK-V8-BAREHF: #define __ARM_ARCH_8A__ 1180// CHECK-V8-BAREHF: #define __ARM_FEATURE_CRC32 1181// CHECK-V8-BAREHF: #define __ARM_FEATURE_DIRECTED_ROUNDING 1182// CHECK-V8-BAREHF: #define __ARM_FEATURE_NUMERIC_MAXMIN 1183// CHECK-V8-BAREHP: #define __ARM_FP 0xe184// CHECK-V8-BAREHF: #define __ARM_NEON__ 1185// CHECK-V8-BAREHF: #define __ARM_PCS_VFP 1186// CHECK-V8-BAREHF: #define __VFP_FP__ 1187 188// RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=fp-armv8 -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF-FP %s189// CHECK-V8-BAREHF-FP-NOT: __ARM_NEON__ 1190// CHECK-V8-BAREHP-FP: #define __ARM_FP 0xe191// CHECK-V8-BAREHF-FP: #define __VFP_FP__ 1192 193// RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=neon-fp-armv8 -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF-NEON-FP %s194// RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF-NEON-FP %s195// CHECK-V8-BAREHP-NEON-FP: #define __ARM_FP 0xe196// CHECK-V8-BAREHF-NEON-FP: #define __ARM_NEON__ 1197// CHECK-V8-BAREHF-NEON-FP: #define __VFP_FP__ 1198 199// RUN: %clang -target armv8a -mnocrc -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-NOCRC %s200// CHECK-V8-NOCRC-NOT: __ARM_FEATURE_CRC32 1201 202// Check that -mhwdiv works properly for armv8/thumbv8 (enabled by default).203 204// RUN: %clang -target armv8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s205// RUN: %clang -target armv8 -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s206// RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s207// RUN: %clang -target armv8-eabi -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s208// V8:#define __ARM_ARCH_EXT_IDIV__ 1209 210// RUN: %clang -target armv8 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s211// RUN: %clang -target armv8 -mthumb -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s212// RUN: %clang -target armv8 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s213// RUN: %clang -target armv8 -mthumb -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s214// NOHWDIV-V8-NOT:#define __ARM_ARCH_EXT_IDIV__215 216// RUN: %clang -target armv8a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s217// RUN: %clang -target armv8a -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s218// V8A:#define __ARM_ARCH_EXT_IDIV__ 1219// V8A-NOT:#define __ARM_FP 0x220 221// RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s222// RUN: %clang -target armv8a-eabi -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s223// RUN: %clang -target armv8a-eabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s224// RUN: %clang -target armv8a-eabihf -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s225// V8A-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1226// V8A-ALLOW-FP-INSTR:#define __ARM_FP 0xe227 228// RUN: %clang -target armv8m.base-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_BASELINE %s229// V8M_BASELINE: #define __ARM_ARCH 8230// V8M_BASELINE: #define __ARM_ARCH_8M_BASE__ 1231// V8M_BASELINE: #define __ARM_ARCH_EXT_IDIV__ 1232// V8M_BASELINE-NOT: __ARM_ARCH_ISA_ARM233// V8M_BASELINE: #define __ARM_ARCH_ISA_THUMB 1234// V8M_BASELINE: #define __ARM_ARCH_PROFILE 'M'235// V8M_BASELINE-NOT: __ARM_FEATURE_CRC32236// V8M_BASELINE: #define __ARM_FEATURE_CMSE 1237// V8M_BASELINE-NOT: __ARM_FEATURE_DSP238// V8M_BASELINE-NOT: __ARM_FP 0x{{.*}}239// V8M_BASELINE-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1240 241// RUN: %clang -target armv8m.main-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_MAINLINE %s242// V8M_MAINLINE: #define __ARM_ARCH 8243// V8M_MAINLINE: #define __ARM_ARCH_8M_MAIN__ 1244// V8M_MAINLINE: #define __ARM_ARCH_EXT_IDIV__ 1245// V8M_MAINLINE-NOT: __ARM_ARCH_ISA_ARM246// V8M_MAINLINE: #define __ARM_ARCH_ISA_THUMB 2247// V8M_MAINLINE: #define __ARM_ARCH_PROFILE 'M'248// V8M_MAINLINE-NOT: __ARM_FEATURE_CRC32249// V8M_MAINLINE: #define __ARM_FEATURE_CMSE 1250// V8M_MAINLINE-NOT: __ARM_FEATURE_DSP251// V8M_MAINLINE-NOT: #define __ARM_FP 0x252// V8M_MAINLINE: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1253 254// RUN: %clang -target armv8m.main-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M-MAINLINE-ALLOW-FP-INSTR %s255// RUN: %clang -target armv8m.main-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M-MAINLINE-ALLOW-FP-INSTR %s256// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH 8257// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1258// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1259// V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM260// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2261// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M'262// V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32263// V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_DSP264// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_FP 0xe265// V8M-MAINLINE-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1266 267// RUN: %clang -target arm-none-linux-gnu -march=armv8-m.main+dsp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_MAINLINE_DSP %s268// V8M_MAINLINE_DSP: #define __ARM_ARCH 8269// V8M_MAINLINE_DSP: #define __ARM_ARCH_8M_MAIN__ 1270// V8M_MAINLINE_DSP: #define __ARM_ARCH_EXT_IDIV__ 1271// V8M_MAINLINE_DSP-NOT: __ARM_ARCH_ISA_ARM272// V8M_MAINLINE_DSP: #define __ARM_ARCH_ISA_THUMB 2273// V8M_MAINLINE_DSP: #define __ARM_ARCH_PROFILE 'M'274// V8M_MAINLINE_DSP-NOT: __ARM_FEATURE_CRC32275// V8M_MAINLINE_DSP: #define __ARM_FEATURE_DSP 1276// V8M_MAINLINE_DSP-NOT: #define __ARM_FP 0x277// V8M_MAINLINE_DSP: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1278 279// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-m.main+dsp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M-MAINLINE-DSP-ALLOW-FP-INSTR %s280// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH 8281// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1282// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1283// V8M-MAINLINE-DSP-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM284// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2285// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M'286// V8M-MAINLINE-DSP-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32287// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_FEATURE_DSP 1288// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_FP 0xe289// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1290 291// RUN: %clang -target arm-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-DEFS %s292// CHECK-DEFS:#define __ARM_PCS 1293// CHECK-DEFS:#define __ARM_SIZEOF_MINIMAL_ENUM 4294// CHECK-DEFS:#define __ARM_SIZEOF_WCHAR_T 4295 296// RUN: %clang -target arm-none-linux-gnu -fno-math-errno -fno-signed-zeros\297// RUN:        -fno-trapping-math -fassociative-math -freciprocal-math -fapprox-func\298// RUN:        -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s299// RUN: %clang -target arm-none-linux-gnu -ffast-math -x c -E -dM %s -o -\300// RUN:        | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s301// CHECK-FASTMATH: #define __ARM_FP_FAST 1302 303// RUN: %clang -target arm-none-linux-gnu -fshort-wchar -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-SHORTWCHAR %s304// CHECK-SHORTWCHAR:#define __ARM_SIZEOF_WCHAR_T 2305 306// RUN: %clang -target arm-none-linux-gnu -fshort-enums -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-SHORTENUMS %s307// CHECK-SHORTENUMS:#define __ARM_SIZEOF_MINIMAL_ENUM 1308 309// Test that -mhwdiv has the right effect for a target CPU which has hwdiv enabled by default.310// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s311// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s312// RUN: %clang -target armv7 -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s313// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s314// HWDIV:#define __ARM_ARCH_EXT_IDIV__ 1315 316// RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s317// RUN: %clang -target arm -mthumb -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s318// RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s319// RUN: %clang -target arm -mthumb -mcpu=cortex-a15 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s320// NOHWDIV-NOT:#define __ARM_ARCH_EXT_IDIV__321 322 323// Check that -mfpu works properly for Cortex-A7 (enabled by default).324// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s325// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s326// RUN: %clang -target armv7-none-linux-gnueabihf -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s327// RUN: %clang -target armv7-none-linux-gnueabihf -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s328// DEFAULTFPU-A7:#define __ARM_FP 0xe329// DEFAULTFPU-A7:#define __ARM_NEON__ 1330// DEFAULTFPU-A7:#define __ARM_VFPV4__ 1331 332// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A7 %s333// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A7 %s334// FPUNONE-A7-NOT:#define __ARM_FP 0x{{.*}}335// FPUNONE-A7-NOT:#define __ARM_NEON__ 1336// FPUNONE-A7-NOT:#define __ARM_VFPV4__ 1337 338// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A7 %s339// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A7 %s340// NONEON-A7:#define __ARM_FP 0xe341// NONEON-A7-NOT:#define __ARM_NEON__ 1342// NONEON-A7:#define __ARM_VFPV4__ 1343 344// Check that -mfpu works properly for Cortex-A5 (enabled by default).345// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A5 %s346// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A5 %s347// DEFAULTFPU-A5:#define __ARM_FP 0xe348// DEFAULTFPU-A5:#define __ARM_NEON__ 1349// DEFAULTFPU-A5:#define __ARM_VFPV4__ 1350 351// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A5 %s352// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A5 %s353// FPUNONE-A5-NOT:#define __ARM_FP 0x{{.*}}354// FPUNONE-A5-NOT:#define __ARM_NEON__ 1355// FPUNONE-A5-NOT:#define __ARM_VFPV4__ 1356 357// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=vfp4-d16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A5 %s358// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=vfp4-d16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A5 %s359// NONEON-A5:#define __ARM_FP 0xe360// NONEON-A5-NOT:#define __ARM_NEON__ 1361// NONEON-A5:#define __ARM_VFPV4__ 1362 363// FIXME: add check for further predefines364// Test whether predefines are as expected when targeting ep9312.365// RUN: %clang -target armv4t -mcpu=ep9312 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A4T %s366// A4T-NOT:#define __ARM_FEATURE_DSP367// A4T-NOT:#define __ARM_FP 0x{{.*}}368 369// Test whether predefines are as expected when targeting arm10tdmi.370// RUN: %clang -target armv5 -mcpu=arm10tdmi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5T %s371// A5T-NOT:#define __ARM_FEATURE_DSP372// A5T-NOT:#define __ARM_FP 0x{{.*}}373 374// Test whether predefines are as expected when targeting cortex-a5i (soft FP ABI as default).375// RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5 %s376// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5 %s377// A5:#define __ARM_ARCH 7378// A5:#define __ARM_ARCH_7A__ 1379// A5-NOT:#define __ARM_ARCH_EXT_IDIV__380// A5:#define __ARM_ARCH_PROFILE 'A'381// A5-NOT:#define __ARM_DWARF_EH__ 1382// A5-NOT: #define __ARM_FEATURE_DIRECTED_ROUNDING383// A5:#define __ARM_FEATURE_DSP 1384// A5-NOT: #define __ARM_FEATURE_NUMERIC_MAXMIN385// A5-NOT:#define __ARM_FP 0x386 387// Test whether predefines are as expected when targeting cortex-a5 (softfp FP ABI as default).388// RUN: %clang -target armv7-eabi -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5-ALLOW-FP-INSTR %s389// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5-ALLOW-FP-INSTR %s390// A5-ALLOW-FP-INSTR:#define __ARM_ARCH 7391// A5-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1392// A5-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__393// A5-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'394// A5-ALLOW-FP-INSTR-NOT: #define __ARM_FEATURE_DIRECTED_ROUNDING395// A5-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1396// A5-ALLOW-FP-INSTR-NOT: #define __ARM_FEATURE_NUMERIC_MAXMIN397// A5-ALLOW-FP-INSTR:#define __ARM_FP 0xe398 399// Test whether predefines are as expected when targeting cortex-a7 (soft FP ABI as default).400// RUN: %clang -target armv7k -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7 %s401// RUN: %clang -target armv7k -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7 %s402// A7:#define __ARM_ARCH 7403// A7:#define __ARM_ARCH_EXT_IDIV__ 1404// A7:#define __ARM_ARCH_PROFILE 'A'405// A7-NOT:#define __ARM_DWARF_EH__ 1406// A7:#define __ARM_FEATURE_DSP 1407// A7-NOT:#define __ARM_FP 0x408 409// Test whether predefines are as expected when targeting cortex-a7 (softfp FP ABI as default).410// RUN: %clang -target armv7k-eabi -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7-ALLOW-FP-INSTR %s411// RUN: %clang -target armv7k-eabi -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7-ALLOW-FP-INSTR %s412// A7-ALLOW-FP-INSTR:#define __ARM_ARCH 7413// A7-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1414// A7-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'415// A7-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1416// A7-ALLOW-FP-INSTR:#define __ARM_FP 0xe417 418// Test whether predefines are as expected when targeting cortex-a7.419// RUN: %clang -target x86_64-apple-darwin -arch armv7k -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV7K %s420// ARMV7K:#define __ARM_ARCH 7421// ARMV7K:#define __ARM_ARCH_EXT_IDIV__ 1422// ARMV7K:#define __ARM_ARCH_PROFILE 'A'423// ARMV7K:#define __ARM_DWARF_EH__ 1424// ARMV7K:#define __ARM_FEATURE_DSP 1425// ARMV7K:#define __ARM_FP 0xe426// ARMV7K:#define __ARM_PCS_VFP 1427 428 429// Test whether predefines are as expected when targeting cortex-a8 (soft FP ABI as default).430// RUN: %clang -target armv7 -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8 %s431// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8 %s432// A8-NOT:#define __ARM_ARCH_EXT_IDIV__433// A8:#define __ARM_FEATURE_DSP 1434// A8-NOT:#define __ARM_FP 0x435 436// Test whether predefines are as expected when targeting cortex-a8 (softfp FP ABI as default).437// RUN: %clang -target armv7-eabi -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8-ALLOW-FP-INSTR %s438// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8-ALLOW-FP-INSTR %s439// A8-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__440// A8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1441// A8-ALLOW-FP-INSTR:#define __ARM_FP 0xc442 443// Test whether predefines are as expected when targeting cortex-a9 (soft FP as default).444// RUN: %clang -target armv7 -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9 %s445// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9 %s446// A9-NOT:#define __ARM_ARCH_EXT_IDIV__447// A9:#define __ARM_FEATURE_DSP 1448// A9-NOT:#define __ARM_FP 0x449 450// Test whether predefines are as expected when targeting cortex-a9 (softfp FP as default).451// RUN: %clang -target armv7-eabi -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9-ALLOW-FP-INSTR %s452// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9-ALLOW-FP-INSTR %s453// A9-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__454// A9-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1455// A9-ALLOW-FP-INSTR:#define __ARM_FP 0xe456 457 458// Check that -mfpu works properly for Cortex-A12 (enabled by default).459// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A12 %s460// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A12 %s461// DEFAULTFPU-A12:#define __ARM_FP 0xe462// DEFAULTFPU-A12:#define __ARM_NEON__ 1463// DEFAULTFPU-A12:#define __ARM_VFPV4__ 1464 465// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a12 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A12 %s466// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a12 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A12 %s467// FPUNONE-A12-NOT:#define __ARM_FP 0x{{.*}}468// FPUNONE-A12-NOT:#define __ARM_NEON__ 1469// FPUNONE-A12-NOT:#define __ARM_VFPV4__ 1470 471// Test whether predefines are as expected when targeting cortex-a12 (soft FP ABI as default).472// RUN: %clang -target armv7 -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12 %s473// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12 %s474// A12:#define __ARM_ARCH 7475// A12:#define __ARM_ARCH_7A__ 1476// A12:#define __ARM_ARCH_EXT_IDIV__ 1477// A12:#define __ARM_ARCH_PROFILE 'A'478// A12:#define __ARM_FEATURE_DSP 1479// A12-NOT:#define __ARM_FP 0x480 481// Test whether predefines are as expected when targeting cortex-a12 (soft FP ABI as default).482// RUN: %clang -target armv7-eabi -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12-ALLOW-FP-INSTR %s483// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12-ALLOW-FP-INSTR %s484// A12-ALLOW-FP-INSTR:#define __ARM_ARCH 7485// A12-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1486// A12-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1487// A12-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'488// A12-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1489// A12-ALLOW-FP-INSTR:#define __ARM_FP 0xe490 491// Test whether predefines are as expected when targeting cortex-a15 (soft FP ABI as default).492// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15 %s493// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15 %s494// A15:#define __ARM_ARCH_EXT_IDIV__ 1495// A15:#define __ARM_FEATURE_DSP 1496// A15-NOT:#define __ARM_FP 0x497 498// Test whether predefines are as expected when targeting cortex-a15 (softfp ABI as default).499// RUN: %clang -target armv7-eabi -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15-ALLOW-FP-INSTR %s500// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15-ALLOW-FP-INSTR %s501// A15-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1502// A15-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1503// A15-ALLOW-FP-INSTR:#define __ARM_FP 0xe504 505// Check that -mfpu works properly for Cortex-A17 (enabled by default).506// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A17 %s507// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A17 %s508// DEFAULTFPU-A17:#define __ARM_FP 0xe509// DEFAULTFPU-A17:#define __ARM_NEON__ 1510// DEFAULTFPU-A17:#define __ARM_VFPV4__ 1511 512// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a17 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A17 %s513// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a17 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A17 %s514// FPUNONE-A17-NOT:#define __ARM_FP 0x{{.*}}515// FPUNONE-A17-NOT:#define __ARM_NEON__ 1516// FPUNONE-A17-NOT:#define __ARM_VFPV4__ 1517 518// Test whether predefines are as expected when targeting cortex-a17 (soft FP ABI as default).519// RUN: %clang -target armv7 -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17 %s520// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17 %s521// A17:#define __ARM_ARCH 7522// A17:#define __ARM_ARCH_7A__ 1523// A17:#define __ARM_ARCH_EXT_IDIV__ 1524// A17:#define __ARM_ARCH_PROFILE 'A'525// A17:#define __ARM_FEATURE_DSP 1526// A17-NOT:#define __ARM_FP 0x527 528// Test whether predefines are as expected when targeting cortex-a17 (softfp FP ABI as default).529// RUN: %clang -target armv7-eabi -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17-ALLOW-FP-INSTR %s530// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17-ALLOW-FP-INSTR %s531// A17-ALLOW-FP-INSTR:#define __ARM_ARCH 7532// A17-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1533// A17-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1534// A17-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'535// A17-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1536// A17-ALLOW-FP-INSTR:#define __ARM_FP 0xe537 538// Test whether predefines are as expected when targeting swift (soft FP ABI as default).539// RUN: %clang -target armv7s -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT %s540// RUN: %clang -target armv7s -mthumb -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT %s541// SWIFT:#define __ARM_ARCH_EXT_IDIV__ 1542// SWIFT:#define __ARM_FEATURE_DSP 1543// SWIFT-NOT:#define __ARM_FP 0xxE544 545// Test whether predefines are as expected when targeting swift (softfp FP ABI as default).546// RUN: %clang -target armv7s-eabi -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT-ALLOW-FP-INSTR %s547// RUN: %clang -target armv7s-eabi -mthumb -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT-ALLOW-FP-INSTR %s548// SWIFT-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1549// SWIFT-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1550// SWIFT-ALLOW-FP-INSTR:#define __ARM_FP 0xe551 552// Test whether predefines are as expected when targeting ARMv8-A Cortex implementations (soft FP ABI as default)553// RUN: %clang -target armv8 -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s554// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s555// RUN: %clang -target armv8 -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s556// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s557// RUN: %clang -target armv8 -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s558// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s559// RUN: %clang -target armv8 -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s560// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s561// RUN: %clang -target armv8 -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s562// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s563// RUN: %clang -target armv8 -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s564// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s565//566// RUN: %clang -target armv8 -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s567// RUN: %clang -target armv8 -mthumb -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s568// RUN: %clang -target armv8 -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s569// RUN: %clang -target armv8 -mthumb -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s570// RUN: %clang -target armv8 -mcpu=exynos-m5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s571// RUN: %clang -target armv8 -mthumb -mcpu=exynos-m5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s572// ARMV8:#define __ARM_ARCH_EXT_IDIV__ 1573// ARMV8:#define __ARM_FEATURE_DSP 1574// ARMV8-NOT:#define __ARM_FP 0x575 576// Test whether predefines are as expected when targeting ARMv8-A Cortex implementations (softfp FP ABI as default)577// RUN: %clang -target armv8-eabi -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s578// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s579// RUN: %clang -target armv8-eabi -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s580// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s581// RUN: %clang -target armv8-eabi -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s582// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s583// RUN: %clang -target armv8-eabi -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s584// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s585// RUN: %clang -target armv8-eabi -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s586// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s587// RUN: %clang -target armv8-eabi -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s588// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s589//590// RUN: %clang -target armv8-eabi -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s591// RUN: %clang -target armv8-eabi -mthumb -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s592// RUN: %clang -target armv8-eabi -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s593// RUN: %clang -target armv8-eabi -mthumb -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s594// RUN: %clang -target armv8-eabi -mcpu=exynos-m5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s595// RUN: %clang -target armv8-eabi -mthumb -mcpu=exynos-m5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s596// ARMV8-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1597// ARMV8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1598// ARMV8-ALLOW-FP-INSTR:#define __ARM_FP 0xe599 600// Test whether predefines are as expected when targeting cortex-r4.601// RUN: %clang -target armv7 -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4-ARM %s602// R4-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__603// R4-ARM:#define __ARM_FEATURE_DSP 1604// R4-ARM-NOT:#define __ARM_FP 0x{{.*}}605 606// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4-THUMB %s607// R4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1608// R4-THUMB:#define __ARM_FEATURE_DSP 1609// R4-THUMB-NOT:#define __ARM_FP 0x{{.*}}610 611// Test whether predefines are as expected when targeting cortex-r4f (soft FP ABI as default).612// RUN: %clang -target armv7 -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-ARM %s613// R4F-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__614// R4F-ARM:#define __ARM_FEATURE_DSP 1615// R4F-ARM-NOT:#define __ARM_FP 0x616 617// Test whether predefines are as expected when targeting cortex-r4f (softfp FP ABI as default).618// RUN: %clang -target armv7-eabi -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-ARM-ALLOW-FP-INSTR %s619// R4F-ARM-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__620// R4F-ARM-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1621// R4F-ARM-ALLOW-FP-INSTR:#define __ARM_FP 0xc622 623// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-THUMB %s624// R4F-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1625// R4F-THUMB:#define __ARM_FEATURE_DSP 1626// R4F-THUMB-NOT:#define __ARM_FP 0x627 628// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-THUMB-ALLOW-FP-INSTR %s629// R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1630// R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1631// R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0xc632 633// Test whether predefines are as expected when targeting cortex-r5 (soft FP ABI as default).634// RUN: %clang -target armv7 -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5 %s635// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5 %s636// R5:#define __ARM_ARCH_EXT_IDIV__ 1637// R5:#define __ARM_FEATURE_DSP 1638// R5-NOT:#define __ARM_FP 0x639 640// Test whether predefines are as expected when targeting cortex-r5 (softfp FP ABI as default).641// RUN: %clang -target armv7-eabi -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5-ALLOW-FP-INSTR %s642// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5-ALLOW-FP-INSTR %s643// R5-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1644// R5-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1645// R5-ALLOW-FP-INSTR:#define __ARM_FP 0xc646 647// Test whether predefines are as expected when targeting cortex-r7 and cortex-r8 (soft FP ABI as default).648// RUN: %clang -target armv7 -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s649// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s650// RUN: %clang -target armv7 -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s651// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s652// R7-R8:#define __ARM_ARCH_EXT_IDIV__ 1653// R7-R8:#define __ARM_FEATURE_DSP 1654// R7-R8-NOT:#define __ARM_FP 0x655 656// Test whether predefines are as expected when targeting cortex-r7 and cortex-r8 (softfp FP ABI as default).657// RUN: %clang -target armv7-eabi -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s658// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s659// RUN: %clang -target armv7-eabi -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s660// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s661// R7-R8-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1662// R7-R8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1663// R7-R8-ALLOW-FP-INSTR:#define __ARM_FP 0xe664 665// Test whether predefines are as expected when targeting cortex-m0.666// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s667// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0plus -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s668// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s669// RUN: %clang -target armv7 -mthumb -mcpu=sc000 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s670// M0-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__671// M0-THUMB-NOT:#define __ARM_FEATURE_DSP672// M0-THUMB-NOT:#define __ARM_FP 0x{{.*}}673 674// Test whether predefines are as expected when targeting cortex-m3.675// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M3-THUMB %s676// RUN: %clang -target armv7 -mthumb -mcpu=sc300 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M3-THUMB %s677// M3-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1678// M3-THUMB-NOT:#define __ARM_FEATURE_DSP679// M3-THUMB-NOT:#define __ARM_FP 0x{{.*}}680 681// Test whether predefines are as expected when targeting cortex-m4 (soft FP ABI as default).682// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M4-THUMB %s683// M4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1684// M4-THUMB:#define __ARM_FEATURE_DSP 1685// M4-THUMB-NOT:#define __ARM_FP 0x686 687// Test whether predefines are as expected when targeting cortex-m4 (softfp ABI as default).688// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M4-THUMB-ALLOW-FP-INSTR %s689// M4-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1690// M4-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1691// M4-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0x6692 693// Test whether predefines are as expected when targeting cortex-m7 (soft FP ABI as default).694// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M7-THUMB %s695// M7-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1696// M7-THUMB:#define __ARM_FEATURE_DSP 1697// M7-THUMB-NOT:#define __ARM_FP 0x698// M7-THUMB-NOT:#define __ARM_FPV5__699 700// Test whether predefines are as expected when targeting cortex-m7 (softfp FP ABI as default).701// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-m7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M7-THUMB-ALLOW-FP-INSTR %s702// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1703// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1704// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0xe705// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FPV5__ 1706 707// Check that -mcmse (security extension) option works correctly for v8-M targets708// RUN: %clang -target armv8m.base-none-linux-gnu -mcmse -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_CMSE %s709// RUN: %clang -target armv8m.main-none-linux-gnu -mcmse -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_CMSE %s710// RUN: %clang -target arm-none-linux-gnu -mcpu=cortex-m33 -mcmse -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_CMSE %s711// RUN: %clang -target arm -mcpu=cortex-m23 -mcmse -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_CMSE %s712// RUN: %clang -target arm-none-linux-gnu -mcpu=cortex-m55 -mcmse -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_CMSE %s713// V8M_CMSE-NOT: __ARM_FEATURE_CMSE 1714// V8M_CMSE: #define __ARM_FEATURE_CMSE 3715 716// Check that CMSE is not defined on architectures w/o support for security extension717// RUN: %clang -target arm-arm-none-gnueabi -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOTV8M_CMSE %s718// RUN: %clang -target armv8a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOTV8M_CMSE %s719// RUN: %clang -target armv8.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOTV8M_CMSE %s720// NOTV8M_CMSE-NOT: __ARM_FEATURE_CMSE721 722// Check that -mcmse option gives error on non v8-M targets723// RUN: not %clang -target arm-arm-none-eabi -mthumb -mcmse -mcpu=cortex-m7 -x c -E -dM %s -o - 2>&1 | FileCheck -match-full-lines --check-prefix=NOTV8MCMSE_OPT %s724// NOTV8MCMSE_OPT: error: -mcmse is not supported for cortex-m7725 726// Test whether predefines are as expected when targeting v8m cores727// RUN: %clang -target arm -mcpu=cortex-m23 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M23 %s728// M23: #define __ARM_ARCH 8729// M23: #define __ARM_ARCH_8M_BASE__ 1730// M23: #define __ARM_ARCH_EXT_IDIV__ 1731// M23-NOT: __ARM_ARCH_ISA_ARM732// M23: #define __ARM_ARCH_ISA_THUMB 1733// M23: #define __ARM_ARCH_PROFILE 'M'734// M23-NOT: __ARM_FEATURE_CRC32735// M23-NOT: __ARM_FEATURE_DSP736// M23-NOT: __ARM_FP 0x{{.*}}737// M23-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1738 739// Test whether predefines are as expected when targeting m33 (soft FP ABI as default).740// RUN: %clang -target arm -mcpu=cortex-m33 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M33 %s741// M33: #define __ARM_ARCH 8742// M33: #define __ARM_ARCH_8M_MAIN__ 1743// M33: #define __ARM_ARCH_EXT_IDIV__ 1744// M33-NOT: __ARM_ARCH_ISA_ARM745// M33: #define __ARM_ARCH_ISA_THUMB 2746// M33: #define __ARM_ARCH_PROFILE 'M'747// M33-NOT: __ARM_FEATURE_CRC32748// M33: #define __ARM_FEATURE_DSP 1749// M33-NOT: #define __ARM_FP 0x750// M33: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1751 752// Test whether predefines are as expected when targeting m33 (softfp FP ABI as default).753// RUN: %clang -target arm-eabi -mcpu=cortex-m33 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M33-ALLOW-FP-INSTR %s754// M33-ALLOW-FP-INSTR: #define __ARM_ARCH 8755// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1756// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1757// M33-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM758// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2759// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M'760// M33-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32761// M33-ALLOW-FP-INSTR: #define __ARM_FEATURE_DSP 1762// M33-ALLOW-FP-INSTR: #define __ARM_FP 0x6763// M33-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1764 765// Test whether predefines are as expected when targeting cortex-m55 (softfp FP ABI as default).766// RUN: %clang -target arm-eabi -mcpu=cortex-m55 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M55 %s767// M55: #define __ARM_ARCH 8768// M55: #define __ARM_ARCH_8_1M_MAIN__ 1769// M55: #define __ARM_ARCH_EXT_IDIV__ 1770// M55-NOT: __ARM_ARCH_ISA_ARM771// M55: #define __ARM_ARCH_ISA_THUMB 2772// M55: #define __ARM_ARCH_PROFILE 'M'773// M55-NOT: __ARM_FEATURE_CRC32774// M55: #define __ARM_FEATURE_DSP 1775// M55: #define __ARM_FEATURE_MVE 3776// M55: #define __ARM_FP 0xe777// M55: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1778 779// Test whether predefines are as expected when targeting krait (soft FP as default).780// RUN: %clang -target armv7 -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s781// RUN: %clang -target armv7 -mthumb -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s782// KRAIT:#define __ARM_ARCH_EXT_IDIV__ 1783// KRAIT:#define __ARM_FEATURE_DSP 1784// KRAIT-NOT:#define  __ARM_VFPV4__785 786// Test whether predefines are as expected when targeting krait (softfp FP as default).787// RUN: %clang -target armv7-eabi -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT-ALLOW-FP-INSTR %s788// RUN: %clang -target armv7-eabi -mthumb -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT-ALLOW-FP-INSTR %s789// KRAIT-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1790// KRAIT-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1791// KRAIT-ALLOW-FP-INSTR:#define  __ARM_VFPV4__ 1792 793// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M %s794// CHECK-V81M: #define __ARM_ARCH 8795// CHECK-V81M: #define __ARM_ARCH_8_1M_MAIN__ 1796// CHECK-V81M: #define __ARM_ARCH_ISA_THUMB 2797// CHECK-V81M: #define __ARM_ARCH_PROFILE 'M'798// CHECK-V81M-NOT: #define __ARM_FEATURE_DSP799// CHECK-V81M-NOT: #define __ARM_FEATURE_MVE800// CHECK-V81M-NOT: #define __ARM_FEATURE_SIMD32801 802// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVE %s803// CHECK-V81M-MVE: #define __ARM_FEATURE_DSP 1804// CHECK-V81M-MVE: #define __ARM_FEATURE_MVE 1805// CHECK-V81M-MVE: #define __ARM_FEATURE_SIMD32 1806 807// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVEFP %s808// CHECK-V81M-MVEFP: #define __ARM_FEATURE_DSP 1809// CHECK-V81M-MVEFP: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1810// CHECK-V81M-MVEFP: #define __ARM_FEATURE_MVE 3811// CHECK-V81M-MVEFP: #define __ARM_FEATURE_SIMD32 1812// CHECK-V81M-MVEFP: #define __ARM_FPV5__ 1813 814// fpu=none/nofp discards mve.fp, but not mve/dsp815// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp+nofp            -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVEFP-NOFP %s816// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp      -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVEFP-NOFP %s817// CHECK-V81M-MVEFP-NOFP: #define __ARM_FEATURE_DSP 1818// CHECK-V81M-MVEFP-NOFP: #define __ARM_FEATURE_MVE 1819 820// nomve discards mve.fp821// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp+nomve -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVEFP-NOMVE %s822// CHECK-V81M-MVEFP-NOMVE-NOT: #define __ARM_FEATURE_MVE823 824// mve+fp doesn't imply mve.fp825// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve+fp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVE-FP %s826// CHECK-V81M-MVE-FP: #define __ARM_FEATURE_MVE 1827 828// nodsp discards both dsp and mve ...829// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve+nodsp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVE-NODSP %s830// CHECK-V81M-MVE-NODSP-NOT: #define __ARM_FEATURE_MVE831// CHECK-V81M-MVE-NODSP-NOT: #define __ARM_FEATURE_DSP832 833// ... and also mve.fp834// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp+nodsp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVE-NODSP %s835// CHECK-V81M-MVE-NODSP-NOT: #define __ARM_FEATURE_MVE836// CHECK-V81M-MVE-NODSP-NOT: #define __ARM_FEATURE_DSP837 838// Test CDE (Custom Datapath Extension) feature test macros839 840// RUN: %clang -target arm-arm-none-eabi -march=armv8m.main -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V8M-NOCDE %s841// CHECK-V8M-NOCDE-NOT: #define __ARM_FEATURE_CDE842// CHECK-V8M-NOCDE-NOT: #define __ARM_FEATURE_CDE_COPROC843// RUN: %clang -target arm-arm-none-eabi -march=armv8m.main+cdecp0+cdecp1+cdecp7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8M-CDE-MASK1 %s844// CHECK-V8M-CDE-MASK1: #define __ARM_FEATURE_CDE 1845// CHECK-V8M-CDE-MASK1: #define __ARM_FEATURE_CDE_COPROC 0x83846// RUN: %clang -target arm-arm-none-eabi -march=armv8m.main+cdecp0+cdecp1+cdecp2+cdecp3+cdecp4+cdecp5+cdecp6+cdecp7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8M-CDE-MASK2 %s847// CHECK-V8M-CDE-MASK2: #define __ARM_FEATURE_CDE 1848// CHECK-V8M-CDE-MASK2: #define __ARM_FEATURE_CDE_COPROC 0xff849 850// RUN: %clang -target armv8.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81A %s851// CHECK-V81A: #define __ARM_ARCH 8852// CHECK-V81A: #define __ARM_ARCH_8_1A__ 1853// CHECK-V81A: #define __ARM_ARCH_PROFILE 'A'854// CHECK-V81A: #define __ARM_FEATURE_QRDMX 1855// CHECK-V81A: #define __ARM_FP 0xe856 857// RUN: %clang -target armv8.2a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V82A %s858// CHECK-V82A: #define __ARM_ARCH 8859// CHECK-V82A: #define __ARM_ARCH_8_2A__ 1860// CHECK-V82A: #define __ARM_ARCH_PROFILE 'A'861// CHECK-V82A: #define __ARM_FEATURE_QRDMX 1862// CHECK-V82A: #define __ARM_FP 0xe863 864// RUN: %clang -target armv7-apple-driverkit21.0 -x c %s -dM -E -o - | FileCheck -match-full-lines --check-prefix=CHECK-DRIVERKIT %s865// CHECK-DRIVERKIT-NOT: #define __ARM_PCS_VFP 1866 867// RUN: %clang -target armv8.3a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V83A %s868// CHECK-V83A: #define __ARM_ARCH 8869// CHECK-V83A: #define __ARM_ARCH_8_3A__ 1870// CHECK-V83A: #define __ARM_ARCH_PROFILE 'A'871 872// RUN: %clang -target armv8.4a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V84A %s873// CHECK-V84A: #define __ARM_ARCH 8874// CHECK-V84A: #define __ARM_ARCH_8_4A__ 1875// CHECK-V84A: #define __ARM_ARCH_PROFILE 'A'876 877// RUN: %clang -target armv8.5a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V85A %s878// CHECK-V85A: #define __ARM_ARCH 8879// CHECK-V85A: #define __ARM_ARCH_8_5A__ 1880// CHECK-V85A: #define __ARM_ARCH_PROFILE 'A'881 882// RUN: %clang -target armv8.6a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V86A %s883// CHECK-V86A: #define __ARM_ARCH 8884// CHECK-V86A: #define __ARM_ARCH_8_6A__ 1885// CHECK-V86A: #define __ARM_ARCH_PROFILE 'A'886 887// RUN: %clang -target armv8.7a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V87A %s888// CHECK-V87A: #define __ARM_ARCH 8889// CHECK-V87A: #define __ARM_ARCH_8_7A__ 1890// CHECK-V87A: #define __ARM_ARCH_PROFILE 'A'891 892// RUN: %clang -target armv8.8a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V88A %s893// CHECK-V88A: #define __ARM_ARCH 8894// CHECK-V88A: #define __ARM_ARCH_8_8A__ 1895// CHECK-V88A: #define __ARM_ARCH_PROFILE 'A'896 897// RUN: %clang -target armv8.9a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V89A %s898// CHECK-V89A: #define __ARM_ARCH 8899// CHECK-V89A: #define __ARM_ARCH_8_9A__ 1900// CHECK-V89A: #define __ARM_ARCH_PROFILE 'A'901 902// RUN: %clang -target armv9a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V9A %s903// CHECK-V9A: #define __ARM_ARCH 9904// CHECK-V9A: #define __ARM_ARCH_9A__ 1905// CHECK-V9A: #define __ARM_ARCH_PROFILE 'A'906 907// RUN: %clang -target armv9.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V91A %s908// CHECK-V91A: #define __ARM_ARCH 9909// CHECK-V91A: #define __ARM_ARCH_9_1A__ 1910// CHECK-V91A: #define __ARM_ARCH_PROFILE 'A'911 912// RUN: %clang -target armv9.2a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V92A %s913// CHECK-V92A: #define __ARM_ARCH 9914// CHECK-V92A: #define __ARM_ARCH_9_2A__ 1915// CHECK-V92A: #define __ARM_ARCH_PROFILE 'A'916 917// RUN: %clang -target armv9.3a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V93A %s918// CHECK-V93A: #define __ARM_ARCH 9919// CHECK-V93A: #define __ARM_ARCH_9_3A__ 1920// CHECK-V93A: #define __ARM_ARCH_PROFILE 'A'921 922// RUN: %clang -target armv9.4a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V94A %s923// CHECK-V94A: #define __ARM_ARCH 9924// CHECK-V94A: #define __ARM_ARCH_9_4A__ 1925// CHECK-V94A: #define __ARM_ARCH_PROFILE 'A'926 927// RUN: %clang -target armv9.5a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V95A %s928// CHECK-V95A: #define __ARM_ARCH 9929// CHECK-V95A: #define __ARM_ARCH_9_5A__ 1930// CHECK-V95A: #define __ARM_ARCH_PROFILE 'A'931 932// RUN: %clang -target armv9.6a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V96A %s933// CHECK-V96A: #define __ARM_ARCH 9934// CHECK-V96A: #define __ARM_ARCH_9_6A__ 1935// CHECK-V96A: #define __ARM_ARCH_PROFILE 'A'936 937// RUN: %clang -target armv9.7a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V97A %s938// CHECK-V97A: #define __ARM_ARCH 9939// CHECK-V97A: #define __ARM_ARCH_9_7A__ 1940// CHECK-V97A: #define __ARM_ARCH_PROFILE 'A'941 942// RUN: %clang -target arm-none-none-eabi -march=armv7-m -mfpu=softvfp -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SOFTVFP %s943// CHECK-SOFTVFP-NOT: #define __ARM_FP 0x944 945// Test Armv8.1-M PACBTI946// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-NOBTI,CHECK-NOPAC %s947// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=bti -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-BTI,CHECK-NOPAC %s948// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=pac-ret -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC,CHECK-NOBTI %s949// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=pac-ret+b-key -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC,CHECK-NOBTI %s950// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=pac-ret+leaf -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC-LEAF,CHECK-NOBTI %s951// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=pac-ret+b-key+leaf -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC-LEAF,CHECK-NOBTI %s952// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=bti+pac-ret -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC,CHECK-BTI %s953// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=bti+pac-ret+b-key -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC,CHECK-BTI %s954// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=bti+pac-ret+leaf -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC-LEAF,CHECK-BTI %s955// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -mbranch-protection=bti+pac-ret+b-key+leaf -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PAC-LEAF,CHECK-BTI %s956// CHECK-NOBTI-NOT: #define __ARM_FEATURE_BTI_DEFAULT957// CHECK-NOPAC-NOT: #define __ARM_FEATURE_PAC_DEFAULT958// CHECK-BTI: #define __ARM_FEATURE_BTI_DEFAULT 1959// CHECK-PAC: #define __ARM_FEATURE_PAC_DEFAULT 1960// CHECK-PAC-LEAF: #define __ARM_FEATURE_PAC_DEFAULT 5961 962// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-NOBTI-EXT,CHECK-NOPAC-EXT %s963// RUN: %clang -target arm-arm-none-eabi -march=armv7-m+pacbti -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-PACBTI-EXT %s964// CHECK-NOBTI-EXT-NOT: #define __ARM_FEATURE_BTI 1965// CHECK-NOPAC-EXT-NOT: #define __ARM_FEATURE_PAUTH 1966// CHECK-PACBTI-EXT: #define __ARM_FEATURE_BTI 1967// CHECK-PACBTI-EXT: #define __ARM_FEATURE_PAUTH 1968 969// ================== Check BFloat16 Extensions.970// RUN: %clang -target arm-arm-none-eabi -march=armv8.6-a+bf16 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-BFLOAT %s971// CHECK-BFLOAT: #define __ARM_BF16_FORMAT_ALTERNATIVE 1972// CHECK-BFLOAT: #define __ARM_FEATURE_BF16 1973// CHECK-BFLOAT: #define __ARM_FEATURE_BF16_VECTOR_ARITHMETIC 1974 975// Check crypto feature test macros976// RUN: %clang -target arm-arm-none-eabi -march=armv8-a+crypto -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-CRYPTO %s977// CHECK-CRYPTO: #define __ARM_ARCH_PROFILE 'A'978// CHECK-CRYPTO: #define __ARM_FEATURE_AES 1979// CHECK-CRYPTO: #define __ARM_FEATURE_CRYPTO 1980// CHECK-CRYPTO: #define __ARM_FEATURE_SHA2 1981// RUN: %clang -target arm-arm-none-eabi -march=armv8-a+nocrypto -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-NOCRYPTO %s982// CHECK-NOCRYPTO: #define __ARM_ARCH_PROFILE 'A'983// CHECK-NOCRYPTO-NOT: #define __ARM_FEATURE_AES 1984// CHECK-NOCRYPTO-NOT: #define __ARM_FEATURE_CRYPTO 1985// CHECK-NOCRYPTO-NOT: #define __ARM_FEATURE_SHA2 1986// RUN: %clang -target arm-arm-none-eabi -march=armv8-a+aes+nosha2 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-AES %s987// CHECK-AES: #define __ARM_ARCH_PROFILE 'A'988// CHECK-AES: #define __ARM_FEATURE_AES 1989// CHECK-AES-NOT: #define __ARM_FEATURE_CRYPTO 1990// CHECK-AES-NOT: #define __ARM_FEATURE_SHA2 1991// RUN: %clang -target arm-arm-none-eabi -march=armv8-a+noaes+sha2 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-SHA2 %s992// CHECK-SHA2: #define __ARM_ARCH_PROFILE 'A'993// CHECK-SHA2-NOT: #define __ARM_FEATURE_AES 1994// CHECK-SHA2-NOT: #define __ARM_FEATURE_CRYPTO 1995// CHECK-SHA2: #define __ARM_FEATURE_SHA2 1996 997// ================== Check default macros for Armv8.1-A and later998// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-BEFORE-V83   %s999// RUN: %clang -target arm-arm-none-eabi -march=armv8.2-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-BEFORE-V83   %s1000// RUN: %clang -target arm-arm-none-eabi -march=armv8.3-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1001// RUN: %clang -target arm-arm-none-eabi -march=armv8.4-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1002// RUN: %clang -target arm-arm-none-eabi -march=armv8.5-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1003// RUN: %clang -target arm-arm-none-eabi -march=armv8.6-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1004// RUN: %clang -target arm-arm-none-eabi -march=armv8.7-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1005// RUN: %clang -target arm-arm-none-eabi -march=armv8.8-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1006// RUN: %clang -target arm-arm-none-eabi -march=armv9-a   -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1007// RUN: %clang -target arm-arm-none-eabi -march=armv9.1-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1008// RUN: %clang -target arm-arm-none-eabi -march=armv9.2-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1009// RUN: %clang -target arm-arm-none-eabi -march=armv9.3-a -x c -E -dM %s -o - | FileCheck --check-prefixes=CHECK-V81-OR-LATER,CHECK-V83-OR-LATER %s1010// CHECK-V83-OR-LATER: __ARM_FEATURE_COMPLEX 11011// CHECK-V81-OR-LATER: __ARM_FEATURE_QRDMX 11012// CHECK-BEFORE-V83-NOT: __ARM_FEATURE_COMPLEX 11013 1014// Check if MVE floating-point feature is disabled (-mve.fp) during explicit fpv5-d16 or fpv5-sp-d161015// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -mfpu=fpv5-d16 -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-MVE1 %s1016// CHECK-MVE1: #define __ARM_FEATURE_MVE 11017// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -mfpu=fpv5-sp-d16 -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-MVE1_2 %s1018// CHECK-MVE1_2: #define __ARM_FEATURE_MVE 11019// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-MVE3 %s1020// CHECK-MVE3: #define __ARM_FEATURE_MVE 31021 1022// Cortex-R52 and Cortex-R52Plus correctly enable the `fpv5-sp-d16` FPU when compiling for the SP only version of the CPU.1023// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52+nosimd+nofp.dp -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-R52 %s1024// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52plus+nosimd+nofp.dp -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-R52 %s1025// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52+nofp.dp -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-R52 %s1026// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52plus+nofp.dp -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-R52 %s1027// CHECK-R52: #define __ARM_FEATURE_FMA 11028// CHECK-R52: #define __ARM_FP 0x61029// CHECK-R52: #define __ARM_FPV5__ 11030// CHECK-R52: #define __ARM_VFPV2__ 11031// CHECK-R52-NEXT: #define __ARM_VFPV3__ 11032// CHECK-R52-NEXT: #define __ARM_VFPV4__ 11033// CHECK-R52-NOT: #define __ARM_NEON 11034// CHECK-R52-NOT: #define __ARM_NEON__1035 1036// Check that on AArch32, Neon is correctly activated when the target supports the feature1037// RUN:  %clang -target arm-none-eabi -march=armv8-a -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-SIMD %s1038// RUN:  %clang -target arm-none-eabi -mcpu=cortex-r52 -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-SIMD %s1039// RUN:  %clang -target arm-none-eabi -mcpu=cortex-a57 -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-SIMD %s1040// CHECK-SIMD: #define __ARM_NEON 11041// CHECK-SIMD: #define __ARM_NEON_FP 0x61042// CHECK-SIMD: #define __ARM_NEON__ 11043 1044// Check that on AArch32 appropriate targets, +nosimd correctly disables NEON instructions. All features that rely on NEON should also be disabled.1045// RUN:  %clang -target arm-none-eabi -march=armv9.6-a+nosimd -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-NOSIMD %s1046// RUN:  %clang -target arm-none-eabi -mcpu=cortex-r52+nosimd -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-NOSIMD %s1047// RUN:  %clang -target arm-none-eabi -mcpu=cortex-a57+nosimd -mfloat-abi=hard -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-NOSIMD %s1048// CHECK-NOSIMD-NOT: #define __ARM_FEATURE_BF16 11049// CHECK-NOSIMD-NOT: #define __ARM_FEATURE_BF16_VECTOR_ARITHMETIC 11050// CHECK-NOSIMD-NOT: #define __ARM_FEATURE_AES 11051// CHECK-NOSIMD-NOT: #define __ARM_FEATURE_CRYPTO 11052// CHECK-NOSIMD-NOT: #define __ARM_FEATURE_DOTPROD 11053// CHECK-NOSIMD-NOT: #define __ARM_FEATURE_SHA2 11054// CHECK-NOSIMD-NOT: #define __ARM_NEON 11055// CHECK-NOSIMD-NOT: #define __ARM_NEON_FP 0x61056// CHECK-NOSIMD-NOT: #define __ARM_NEON__ 11057 1058// Check that disabling SVE, as set by armv9-a, does not define __ARM_FEATURE_SVE* macros.1059// RUN:  %clang -target aarch64 -march=armv9-a+nosve -x c -E -dM -o - %s | FileCheck -check-prefix=CHECK-NOSVE %s1060// CHECK-NOSVE-NOT: #define __ARM_FEATURE_SVE 11061// CHECK-NOSVE-NOT: #define __ARM_FEATURE_SVE2 11062