summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtyom Skrobov <Artyom.Skrobov@arm.com>2015-10-29 13:56:19 +0000
committerArtyom Skrobov <Artyom.Skrobov@arm.com>2015-10-29 13:56:19 +0000
commit0ff1ce4038f3e228ae728dd74e539e126bd5447c (patch)
treea2adbc413fe21f370737f332020be8cf7bd53a46
parent7d557910c6aa04396235da74bc6fe5341b0cc5c8 (diff)
downloadbcm5719-llvm-0ff1ce4038f3e228ae728dd74e539e126bd5447c.tar.gz
bcm5719-llvm-0ff1ce4038f3e228ae728dd74e539e126bd5447c.zip
Recognize that ARM1176JZ[F]-S support TrustZone
Summary: ARMv6KZ cores were set up incorrectly in ARM.td; also, the SMI mnemonic (the old name for SMC, as defined in ARMv6KZ) wasn't supported. Reviewers: jmolloy, rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D14154 llvm-svn: 251627
-rw-r--r--llvm/lib/Target/ARM/ARM.td4
-rw-r--r--llvm/lib/Target/ARM/ARMInstrInfo.td1
-rw-r--r--llvm/test/MC/ARM/arm-thumb-trustzone.s1
-rw-r--r--llvm/test/MC/ARM/arm-trustzone.s3
4 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARM.td b/llvm/lib/Target/ARM/ARM.td
index 26415be1446..e7423c3dcf8 100644
--- a/llvm/lib/Target/ARM/ARM.td
+++ b/llvm/lib/Target/ARM/ARM.td
@@ -360,8 +360,10 @@ def : Processor<"sc000", ARMV6Itineraries, [HasV6MOps, FeatureNoARM,
FeatureDB, FeatureMClass]>;
// V6K Processors.
-def : Processor<"arm1176jz-s", ARMV6Itineraries, [HasV6KOps]>;
+def : Processor<"arm1176jz-s", ARMV6Itineraries, [HasV6KOps,
+ FeatureTrustZone]>;
def : Processor<"arm1176jzf-s", ARMV6Itineraries, [HasV6KOps, FeatureVFP2,
+ FeatureTrustZone,
FeatureHasSlowFPVMLx]>;
def : Processor<"mpcorenovfp", ARMV6Itineraries, [HasV6KOps]>;
def : Processor<"mpcore", ARMV6Itineraries, [HasV6KOps, FeatureVFP2,
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.td b/llvm/lib/Target/ARM/ARMInstrInfo.td
index 9506e1ebef7..9962fc94766 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.td
+++ b/llvm/lib/Target/ARM/ARMInstrInfo.td
@@ -2329,6 +2329,7 @@ def SMC : ABI<0b0001, (outs), (ins imm0_15:$opt), NoItinerary, "smc", "\t$opt",
let Inst{23-4} = 0b01100000000000000111;
let Inst{3-0} = opt;
}
+def : MnemonicAlias<"smi", "smc">;
// Supervisor Call (Software Interrupt)
let isCall = 1, Uses = [SP] in {
diff --git a/llvm/test/MC/ARM/arm-thumb-trustzone.s b/llvm/test/MC/ARM/arm-thumb-trustzone.s
index 7755a3c8e69..4fec4b7e982 100644
--- a/llvm/test/MC/ARM/arm-thumb-trustzone.s
+++ b/llvm/test/MC/ARM/arm-thumb-trustzone.s
@@ -1,5 +1,6 @@
@ RUN: not llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ
@ RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ
+@ RUN: not llvm-mc -triple=thumbv6kz -mcpu=arm1176jzf-s -show-encoding < %s | FileCheck %s -check-prefix=NOTZ
.syntax unified
.globl _func
diff --git a/llvm/test/MC/ARM/arm-trustzone.s b/llvm/test/MC/ARM/arm-trustzone.s
index 72bac48e84e..5ab27b58dfe 100644
--- a/llvm/test/MC/ARM/arm-trustzone.s
+++ b/llvm/test/MC/ARM/arm-trustzone.s
@@ -1,5 +1,6 @@
@ RUN: not llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ
@ RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ
+@ RUN: llvm-mc -triple=armv6kz -mcpu=arm1176jz-s -show-encoding < %s | FileCheck %s -check-prefix=TZ
.syntax unified
.globl _func
@@ -14,7 +15,7 @@ _func:
@------------------------------------------------------------------------------
@ SMC
@------------------------------------------------------------------------------
- smc #0xf
+ smi #0xf @ SMI is old (ARMv6KZ) name for SMC
smceq #0
@ NOTZ-NOT: smc #15
OpenPOWER on IntegriCloud