mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Add subtarget feature support for Cortex-A53
Some previous implicit defaults have changed, for example FP and NEON are now on by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192590 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9672a89c71
commit
7220572e74
@ -196,6 +196,13 @@ def ProcA15 : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15",
|
|||||||
[FeatureT2XtPk, FeatureVFP4,
|
[FeatureT2XtPk, FeatureVFP4,
|
||||||
FeatureAvoidPartialCPSR,
|
FeatureAvoidPartialCPSR,
|
||||||
FeatureTrustZone]>;
|
FeatureTrustZone]>;
|
||||||
|
|
||||||
|
def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
|
||||||
|
"Cortex-A53 ARM processors",
|
||||||
|
[FeatureMP, FeatureHWDiv, FeatureHWDivARM,
|
||||||
|
FeatureTrustZone, FeatureT2XtPk,
|
||||||
|
FeatureCrypto]>;
|
||||||
|
|
||||||
def ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5",
|
def ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5",
|
||||||
"Cortex-R5 ARM processors",
|
"Cortex-R5 ARM processors",
|
||||||
[FeatureSlowFPBrcc,
|
[FeatureSlowFPBrcc,
|
||||||
@ -316,7 +323,9 @@ def : ProcessorModel<"swift", SwiftModel,
|
|||||||
FeatureHasRAS, FeatureAClass]>;
|
FeatureHasRAS, FeatureAClass]>;
|
||||||
|
|
||||||
// V8 Processors
|
// V8 Processors
|
||||||
def : ProcNoItin<"cortex-a53", [HasV8Ops, FeatureAClass]>;
|
def : ProcNoItin<"cortex-a53", [ProcA53, HasV8Ops, FeatureAClass,
|
||||||
|
FeatureDB, FeatureFPARMv8,
|
||||||
|
FeatureNEON, FeatureDSPThumb2]>;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Register File Description
|
// Register File Description
|
||||||
|
@ -31,7 +31,7 @@ class TargetOptions;
|
|||||||
class ARMSubtarget : public ARMGenSubtargetInfo {
|
class ARMSubtarget : public ARMGenSubtargetInfo {
|
||||||
protected:
|
protected:
|
||||||
enum ARMProcFamilyEnum {
|
enum ARMProcFamilyEnum {
|
||||||
Others, CortexA5, CortexA8, CortexA9, CortexA15, CortexR5, Swift
|
Others, CortexA5, CortexA8, CortexA9, CortexA15, CortexR5, Swift, CortexA53
|
||||||
};
|
};
|
||||||
enum ARMProcClassEnum {
|
enum ARMProcClassEnum {
|
||||||
None, AClass, RClass, MClass
|
None, AClass, RClass, MClass
|
||||||
|
@ -103,8 +103,13 @@ std::string ARM_MC::ParseARMTriple(StringRef TT, StringRef CPU) {
|
|||||||
if (Idx) {
|
if (Idx) {
|
||||||
unsigned SubVer = TT[Idx];
|
unsigned SubVer = TT[Idx];
|
||||||
if (SubVer == '8') {
|
if (SubVer == '8') {
|
||||||
// FIXME: Parse v8 features
|
if (NoCPU)
|
||||||
ARMArchFeature = "+v8,+db";
|
// v8a: FeatureDB, FeatureFPARMv8, FeatureNEON, FeatureDSPThumb2, FeatureMP,
|
||||||
|
// FeatureHWDiv, FeatureHWDivARM, FeatureTrustZone, FeatureT2XtPk, FeatureCrypto
|
||||||
|
ARMArchFeature = "+v8,+db,+fp-armv8,+neon,+t2dsp,+mp,+hwdiv,+hwdiv-arm,+trustzone,+t2xtpk,+crypto";
|
||||||
|
else
|
||||||
|
// Use CPU to figure out the exact features
|
||||||
|
ARMArchFeature = "+v8";
|
||||||
} else if (SubVer == '7') {
|
} else if (SubVer == '7') {
|
||||||
if (Len >= Idx+2 && TT[Idx+1] == 'm') {
|
if (Len >= Idx+2 && TT[Idx+1] == 'm') {
|
||||||
isThumb = true;
|
isThumb = true;
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
; RUN: llc < %s -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=V7
|
; RUN: llc < %s -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=V7
|
||||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi | FileCheck %s --check-prefix=V8
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi | FileCheck %s --check-prefix=V8
|
||||||
; RUN: llc < %s -mtriple=thumbv8-linux-gnueabi | FileCheck %s --check-prefix=Vt8
|
; RUN: llc < %s -mtriple=thumbv8-linux-gnueabi | FileCheck %s --check-prefix=Vt8
|
||||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+fp-armv8 | FileCheck %s --check-prefix=V8-FPARMv8
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=-neon,-crypto | FileCheck %s --check-prefix=V8-FPARMv8
|
||||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+neon | FileCheck %s --check-prefix=V8-NEON
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=-fp-armv8,-crypto | FileCheck %s --check-prefix=V8-NEON
|
||||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+fp-armv8 -mattr=+neon | FileCheck %s --check-prefix=V8-FPARMv8-NEON
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=-crypto | FileCheck %s --check-prefix=V8-FPARMv8-NEON
|
||||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+fp-armv8,+neon,+crypto | FileCheck %s --check-prefix=V8-FPARMv8-NEON-CRYPTO
|
; RUN: llc < %s -mtriple=armv8-linux-gnueabi | FileCheck %s --check-prefix=V8-FPARMv8-NEON-CRYPTO
|
||||||
; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mcpu=cortex-a9 | FileCheck %s --check-prefix=CORTEX-A9
|
; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mcpu=cortex-a9 | FileCheck %s --check-prefix=CORTEX-A9
|
||||||
; RUN: llc < %s -mtriple=thumbv6m-linux-gnueabi -mcpu=cortex-m0 | FileCheck %s --check-prefix=CORTEX-M0
|
; RUN: llc < %s -mtriple=thumbv6m-linux-gnueabi -mcpu=cortex-m0 | FileCheck %s --check-prefix=CORTEX-M0
|
||||||
; RUN: llc < %s -mtriple=thumbv7m-linux-gnueabi -mcpu=cortex-m4 | FileCheck %s --check-prefix=CORTEX-M4
|
; RUN: llc < %s -mtriple=thumbv7m-linux-gnueabi -mcpu=cortex-m4 | FileCheck %s --check-prefix=CORTEX-M4
|
||||||
@ -140,8 +140,12 @@
|
|||||||
; CORTEX-A53: .eabi_attribute 7, 65
|
; CORTEX-A53: .eabi_attribute 7, 65
|
||||||
; CORTEX-A53: .eabi_attribute 8, 1
|
; CORTEX-A53: .eabi_attribute 8, 1
|
||||||
; CORTEX-A53: .eabi_attribute 9, 2
|
; CORTEX-A53: .eabi_attribute 9, 2
|
||||||
|
; CORTEX-A53: .fpu crypto-neon-fp-armv8
|
||||||
|
; CORTEX-A53: .eabi_attribute 10, 7
|
||||||
|
; CORTEX-A53: .eabi_attribute 12, 3
|
||||||
; CORTEX-A53: .eabi_attribute 24, 1
|
; CORTEX-A53: .eabi_attribute 24, 1
|
||||||
; CORTEX-A53: .eabi_attribute 25, 1
|
; CORTEX-A53: .eabi_attribute 25, 1
|
||||||
|
; CORTEX-A53: .eabi_attribute 44, 2
|
||||||
|
|
||||||
define i32 @f(i64 %z) {
|
define i32 @f(i64 %z) {
|
||||||
ret i32 0
|
ret i32 0
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@ RUN: not llvm-mc -triple armv8 -show-encoding -mattr=+fp-armv8 < %s 2>&1 | FileCheck %s --check-prefix=V8
|
@ RUN: not llvm-mc -triple armv8 -show-encoding -mattr=-neon < %s 2>&1 | FileCheck %s --check-prefix=V8
|
||||||
|
|
||||||
@ VCVT{B,T}
|
@ VCVT{B,T}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@ RUN: not llvm-mc -triple armv8 -mattr=+neon,+crypto -show-encoding < %s 2>&1 | FileCheck %s
|
@ RUN: not llvm-mc -triple armv8 -mattr=-fp-armv8 -show-encoding < %s 2>&1 | FileCheck %s
|
||||||
|
|
||||||
vmaxnm.f32 s4, d5, q1
|
vmaxnm.f32 s4, d5, q1
|
||||||
@ CHECK: error: invalid operand for instruction
|
@ CHECK: error: invalid operand for instruction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user