[PATCH] D14154: Recognize that ARM1176JZ[F]-S support TrustZone
A. Skrobov via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 11:24:36 PDT 2015
tyomitch created this revision.
tyomitch added reviewers: jmolloy, rengolin.
tyomitch added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.
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.
http://reviews.llvm.org/D14154
Files:
lib/Target/ARM/ARM.td
lib/Target/ARM/ARMInstrInfo.td
test/MC/ARM/arm-thumb-trustzone.s
test/MC/ARM/arm-trustzone.s
Index: test/MC/ARM/arm-trustzone.s
===================================================================
--- test/MC/ARM/arm-trustzone.s
+++ 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 @@
@------------------------------------------------------------------------------
@ SMC
@------------------------------------------------------------------------------
- smc #0xf
+ smi #0xf @ SMI is old (ARMv6KZ) name for SMC
smceq #0
@ NOTZ-NOT: smc #15
Index: test/MC/ARM/arm-thumb-trustzone.s
===================================================================
--- test/MC/ARM/arm-thumb-trustzone.s
+++ 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
Index: lib/Target/ARM/ARMInstrInfo.td
===================================================================
--- lib/Target/ARM/ARMInstrInfo.td
+++ lib/Target/ARM/ARMInstrInfo.td
@@ -2329,6 +2329,7 @@
let Inst{23-4} = 0b01100000000000000111;
let Inst{3-0} = opt;
}
+def : MnemonicAlias<"smi", "smc">;
// Supervisor Call (Software Interrupt)
let isCall = 1, Uses = [SP] in {
Index: lib/Target/ARM/ARM.td
===================================================================
--- lib/Target/ARM/ARM.td
+++ lib/Target/ARM/ARM.td
@@ -360,8 +360,10 @@
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14154.38674.patch
Type: text/x-patch
Size: 2778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151028/bf8af4af/attachment.bin>
More information about the llvm-commits
mailing list