diff options
Diffstat (limited to 'test/Preprocessor/arm-target-features.c')
-rw-r--r-- | test/Preprocessor/arm-target-features.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/Preprocessor/arm-target-features.c b/test/Preprocessor/arm-target-features.c index f45c5ba07f0fd..81dab475fc9df 100644 --- a/test/Preprocessor/arm-target-features.c +++ b/test/Preprocessor/arm-target-features.c @@ -27,6 +27,13 @@ // CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING // CHECK-V7: #define __ARM_FP 0xC +// RUN: %clang -target armv7ve-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE %s +// CHECK-V7VE: #define __ARMEL__ 1 +// CHECK-V7VE: #define __ARM_ARCH 7 +// CHECK-V7VE: #define __ARM_ARCH_7VE__ 1 +// CHECK-V7VE: #define __ARM_ARCH_EXT_IDIV__ 1 +// CHECK-V7VE: #define __ARM_FP 0xC + // RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7S %s // CHECK-V7S: #define __ARMEL__ 1 // CHECK-V7S: #define __ARM_ARCH 7 @@ -391,6 +398,31 @@ // M7-THUMB:#define __ARM_FP 0xE // M7-THUMB:#define __ARM_FPV5__ 1 +// Test whether predefines are as expected when targeting v8m cores +// RUN: %clang -target arm -mcpu=cortex-m23 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M23 %s +// M23: #define __ARM_ARCH 8 +// M23: #define __ARM_ARCH_8M_BASE__ 1 +// M23: #define __ARM_ARCH_EXT_IDIV__ 1 +// M23-NOT: __ARM_ARCH_ISA_ARM +// M23: #define __ARM_ARCH_ISA_THUMB 1 +// M23: #define __ARM_ARCH_PROFILE 'M' +// M23-NOT: __ARM_FEATURE_CRC32 +// M23-NOT: __ARM_FEATURE_DSP +// M23-NOT: __ARM_FP 0x{{.*}} +// M23-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 + +// RUN: %clang -target arm -mcpu=cortex-m33 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M33 %s +// M33: #define __ARM_ARCH 8 +// M33: #define __ARM_ARCH_8M_MAIN__ 1 +// M33: #define __ARM_ARCH_EXT_IDIV__ 1 +// M33-NOT: __ARM_ARCH_ISA_ARM +// M33: #define __ARM_ARCH_ISA_THUMB 2 +// M33: #define __ARM_ARCH_PROFILE 'M' +// M33-NOT: __ARM_FEATURE_CRC32 +// M33: #define __ARM_FEATURE_DSP 1 +// M33: #define __ARM_FP 0x6 +// M33: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 + // Test whether predefines are as expected when targeting krait. // RUN: %clang -target armv7 -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s // RUN: %clang -target armv7 -mthumb -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s |