From: Javed Absar Date: Fri, 7 Oct 2016 12:08:41 +0000 (+0000) Subject: [ARM]: Add Cortex-R52 target X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd95f43992991160c706cc1d116402b31b43e9d2;p=clang [ARM]: Add Cortex-R52 target This patch adds Cortex-R52, the new ARM real-time processor. Cortex-R52 implements the ARMv8-R architecture. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283543 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 126492d27b..52dd91bce0 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -4929,6 +4929,8 @@ class ARMTargetInfo : public TargetInfo { return "8M_BASE"; case llvm::ARM::AK_ARMV8MMainline: return "8M_MAIN"; + case llvm::ARM::AK_ARMV8R: + return "8R"; } } diff --git a/test/Driver/arm-cortex-cpus.c b/test/Driver/arm-cortex-cpus.c index ca04f11605..3f6ccf4fe5 100644 --- a/test/Driver/arm-cortex-cpus.c +++ b/test/Driver/arm-cortex-cpus.c @@ -146,6 +146,27 @@ // RUN: %clang -target arm -mlittle-endian -march=armv8-a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s // CHECK-V8A: "-cc1"{{.*}} "-triple" "armv8-{{.*}}" "-target-cpu" "cortex-a53" +// RUN: %clang -target armv8r-linux-gnueabi -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8R %s +// RUN: %clang -target arm -march=armv8r -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8R %s +// RUN: %clang -target arm -march=armv8-r -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8R %s +// CHECK-V8R: "-cc1"{{.*}} "-triple" "armv8r-{{.*}} "-target-cpu" "cortex-r52" + +// RUN: %clang -target armv8r-linux-gnueabi -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8R-BIG %s +// RUN: %clang -target arm -march=armv8r -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8R-BIG %s +// RUN: %clang -target arm -march=armv8-r -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8R-BIG %s +// CHECK-V8R-BIG: "-cc1"{{.*}} "-triple" "armebv8r-{{.*}} "-target-cpu" "cortex-r52" + +// RUN: %clang -target armv8r-linux-gnueabi -mthumb -### -c %s 2>&1 | \ +// RUN: FileCheck -check-prefix=CHECK-V8R-THUMB %s +// RUN: %clang -target arm -march=armv8r -mthumb -### -c %s 2>&1 | \ +// RUN: FileCheck -check-prefix=CHECK-V8R-THUMB %s +// CHECK-V8R-THUMB: "-cc1"{{.*}} "-triple" "thumbv8r-{{.*}} "-target-cpu" "cortex-r52" +// RUN: %clang -target armv8r-linux-gnueabi -mthumb -mbig-endian -### -c %s 2>&1 | \ +// RUN: FileCheck -check-prefix=CHECK-V8R-THUMB-BIG %s +// RUN: %clang -target arm -march=armv8r -mthumb -mbig-endian -### -c %s 2>&1 | \ +// RUN: FileCheck -check-prefix=CHECK-V8R-THUMB-BIG %s +// CHECK-V8R-THUMB-BIG: "-cc1"{{.*}} "-triple" "thumbebv8r-{{.*}} "-target-cpu + // RUN: %clang -mcpu=generic -target armv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-GENERIC %s // RUN: %clang -mcpu=generic -target arm -march=armv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-GENERIC %s // RUN: %clang -mcpu=generic -target armv8a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-GENERIC %s @@ -502,6 +523,9 @@ // RUN: %clang -target arm -mcpu=exynos-m2 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A %s // CHECK-BE-CPUV8A: "-cc1"{{.*}} "-triple" "armebv8-{{.*}} +// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r52 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8R %s +// CHECK-CPUV8R: "-cc1"{{.*}} "-triple" "armv8r-{{.*}} + // RUN: %clang -target arm -mcpu=cortex-a32 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s // RUN: %clang -target arm -mcpu=cortex-a35 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s // RUN: %clang -target arm -mcpu=cortex-a53 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s diff --git a/test/Preprocessor/arm-target-features.c b/test/Preprocessor/arm-target-features.c index be235606e2..1a27d5bc50 100644 --- a/test/Preprocessor/arm-target-features.c +++ b/test/Preprocessor/arm-target-features.c @@ -9,6 +9,15 @@ // CHECK-V8A: #define __ARM_FP16_ARGS 1 // CHECK-V8A: #define __ARM_FP16_FORMAT_IEEE 1 +// RUN: %clang -target armv8r-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R %s +// CHECK-V8R: #define __ARMEL__ 1 +// CHECK-V8R: #define __ARM_ARCH 8 +// CHECK-V8R: #define __ARM_ARCH_8R__ 1 +// CHECK-V8R: #define __ARM_FEATURE_CRC32 1 +// CHECK-V8R: #define __ARM_FEATURE_DIRECTED_ROUNDING 1 +// CHECK-V8R: #define __ARM_FEATURE_NUMERIC_MAXMIN 1 +// CHECK-V8R: #define __ARM_FP 0xE + // RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7 %s // CHECK-V7: #define __ARMEL__ 1 // CHECK-V7: #define __ARM_ARCH 7