[llvm] r251627 - Recognize that ARM1176JZ[F]-S support TrustZone

Artyom Skrobov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 06:56:20 PDT 2015


Author: askrobov
Date: Thu Oct 29 08:56:19 2015
New Revision: 251627

URL: http://llvm.org/viewvc/llvm-project?rev=251627&view=rev
Log:
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

Modified:
    llvm/trunk/lib/Target/ARM/ARM.td
    llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
    llvm/trunk/test/MC/ARM/arm-thumb-trustzone.s
    llvm/trunk/test/MC/ARM/arm-trustzone.s

Modified: llvm/trunk/lib/Target/ARM/ARM.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.td?rev=251627&r1=251626&r2=251627&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARM.td (original)
+++ llvm/trunk/lib/Target/ARM/ARM.td Thu Oct 29 08:56:19 2015
@@ -360,8 +360,10 @@ def : Processor<"sc000",            ARMV
                                                        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,

Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=251627&r1=251626&r2=251627&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Thu Oct 29 08:56:19 2015
@@ -2329,6 +2329,7 @@ def SMC : ABI<0b0001, (outs), (ins imm0_
   let Inst{23-4} = 0b01100000000000000111;
   let Inst{3-0} = opt;
 }
+def : MnemonicAlias<"smi", "smc">;
 
 // Supervisor Call (Software Interrupt)
 let isCall = 1, Uses = [SP] in {

Modified: llvm/trunk/test/MC/ARM/arm-thumb-trustzone.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/arm-thumb-trustzone.s?rev=251627&r1=251626&r2=251627&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/arm-thumb-trustzone.s (original)
+++ llvm/trunk/test/MC/ARM/arm-thumb-trustzone.s Thu Oct 29 08:56:19 2015
@@ -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

Modified: llvm/trunk/test/MC/ARM/arm-trustzone.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/arm-trustzone.s?rev=251627&r1=251626&r2=251627&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/arm-trustzone.s (original)
+++ llvm/trunk/test/MC/ARM/arm-trustzone.s Thu Oct 29 08:56:19 2015
@@ -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




More information about the llvm-commits mailing list