diff options
Diffstat (limited to 'test/Preprocessor/arm-target-features.c')
| -rw-r--r-- | test/Preprocessor/arm-target-features.c | 36 | 
1 files changed, 36 insertions, 0 deletions
| diff --git a/test/Preprocessor/arm-target-features.c b/test/Preprocessor/arm-target-features.c index e95a50d02277..0dace434abb0 100644 --- a/test/Preprocessor/arm-target-features.c +++ b/test/Preprocessor/arm-target-features.c @@ -264,6 +264,24 @@  // A53-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1  // A53-THUMB:#define __ARM_FEATURE_DSP +// Test whether predefines are as expected when targeting cortex-r4. +// RUN: %clang -target armv7 -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck --check-prefix=R4-ARM %s +// R4-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__ +// R4-ARM:#define __ARM_FEATURE_DSP + +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck --check-prefix=R4-THUMB %s +// R4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 +// R4-THUMB:#define __ARM_FEATURE_DSP + +// Test whether predefines are as expected when targeting cortex-r4f. +// RUN: %clang -target armv7 -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck --check-prefix=R4F-ARM %s +// R4F-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__ +// R4F-ARM:#define __ARM_FEATURE_DSP + +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck --check-prefix=R4F-THUMB %s +// R4F-THUMBT:#define __ARM_ARCH_EXT_IDIV__ 1 +// R4F-THUMB:#define __ARM_FEATURE_DSP +  // Test whether predefines are as expected when targeting cortex-r5.  // RUN: %clang -target armv7 -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck --check-prefix=R5-ARM %s  // R5-ARM:#define __ARM_ARCH_EXT_IDIV__ 1 @@ -273,13 +291,26 @@  // R5-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1  // R5-THUMB:#define __ARM_FEATURE_DSP +// Test whether predefines are as expected when targeting cortex-r7. +// RUN: %clang -target armv7 -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-ARM %s +// R7-ARM:#define __ARM_ARCH_EXT_IDIV__ 1 +// R7-ARM:#define __ARM_FEATURE_DSP + +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck --check-prefix=R7-THUMB %s +// R7-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 +// R7-THUMB:#define __ARM_FEATURE_DSP +  // Test whether predefines are as expected when targeting cortex-m0.  // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0 -x c -E -dM %s -o - | FileCheck --check-prefix=M0-THUMB %s +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0plus -x c -E -dM %s -o - | FileCheck --check-prefix=M0-THUMB %s +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m1 -x c -E -dM %s -o - | FileCheck --check-prefix=M0-THUMB %s +// RUN: %clang -target armv7 -mthumb -mcpu=sc000 -x c -E -dM %s -o - | FileCheck --check-prefix=M0-THUMB %s  // M0-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__  // M0-THUMB-NOT:#define __ARM_FEATURE_DSP  // Test whether predefines are as expected when targeting cortex-m3.  // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m3 -x c -E -dM %s -o - | FileCheck --check-prefix=M3-THUMB %s +// RUN: %clang -target armv7 -mthumb -mcpu=sc300 -x c -E -dM %s -o - | FileCheck --check-prefix=M3-THUMB %s  // M3-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1  // M3-THUMB-NOT:#define __ARM_FEATURE_DSP @@ -303,3 +334,8 @@  // KRAIT-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1  // KRAIT-THUMB:#define __ARM_FEATURE_DSP  // KRAIT-THUMB:#define  __ARM_VFPV4__ 1 + +// RUN: %clang -target armv8.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V81A %s +// CHECK-V81A: __ARM_ARCH 8 +// CHECK-V81A: __ARM_ARCH_8_1A__ 1 +// CHECK-V81A: #define __ARM_ARCH_PROFILE 'A' | 
