Index: cfe/trunk/test/Driver/arm-cortex-cpus.c =================================================================== --- cfe/trunk/test/Driver/arm-cortex-cpus.c +++ cfe/trunk/test/Driver/arm-cortex-cpus.c @@ -579,6 +579,12 @@ // CHECK-CORTEX-A73-SOFT: "-target-feature" "+soft-float" // CHECK-CORTEX-A73-SOFT: "-target-feature" "+soft-float-abi" +// RUN: %clang -target arm -mcpu=cortex-m23 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8MBASE %s +// CHECK-CPUV8MBASE: "-cc1"{{.*}} "-triple" "thumbv8m.base- + +// RUN: %clang -target arm -mcpu=cortex-m33 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8MMAIN %s +// CHECK-CPUV8MMAIN: "-cc1"{{.*}} "-triple" "thumbv8m.main- + // ================== Check whether -mcpu accepts mixed-case values. // RUN: %clang -target arm-linux-gnueabi -mcpu=Cortex-a5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s // RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-A7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CASE-INSENSITIVE-CPUV7A %s Index: cfe/trunk/test/Preprocessor/arm-target-features.c =================================================================== --- cfe/trunk/test/Preprocessor/arm-target-features.c +++ cfe/trunk/test/Preprocessor/arm-target-features.c @@ -398,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