From 1a89f581d99385620ef9e64e6bcb11a71e1099a7 Mon Sep 17 00:00:00 2001 From: Amara Emerson Date: Mon, 25 Nov 2013 13:18:59 +0000 Subject: [PATCH] [ARM] Enable FeatureMP for Cortex-A5 by default. Patch by Oliver Stannard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195641 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Preprocessor/arm-target-features.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/Preprocessor/arm-target-features.c b/test/Preprocessor/arm-target-features.c index 7348b65626..ee84269b88 100644 --- a/test/Preprocessor/arm-target-features.c +++ b/test/Preprocessor/arm-target-features.c @@ -111,6 +111,22 @@ // NONEON-A7-NOT:#define __ARM_NEON__ 1 // NONEON-A7:#define __ARM_VFPV4__ 1 +// Check that -mfpu works properly for Cortex-A5 (enabled by default). +// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A5 %s +// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A5 %s +// DEFAULTFPU-A5:#define __ARM_NEON__ 1 +// DEFAULTFPU-A5:#define __ARM_VFPV4__ 1 + +// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A5 %s +// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A5 %s +// FPUNONE-A5-NOT:#define __ARM_NEON__ 1 +// FPUNONE-A5-NOT:#define __ARM_VFPV4__ 1 + +// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s +// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s +// NONEON-A5-NOT:#define __ARM_NEON__ 1 +// NONEON-A5:#define __ARM_VFPV4__ 1 + // FIXME: add check for further predefines // Test whether predefines are as expected when targeting cortex-a5. // RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5-ARM %s @@ -119,6 +135,12 @@ // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5-THUMB %s // A5-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__ +// RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5 %s +// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5 %s +// A5:#define __ARM_ARCH 7 +// A5:#define __ARM_ARCH_7A__ 1 +// A5:#define __ARM_ARCH_PROFILE A + // Test whether predefines are as expected when targeting cortex-a7. // RUN: %clang -target armv7 -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=A7 %s // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=A7 %s -- 2.40.0