xref: /aosp_15_r20/external/llvm/test/MC/ARM/arm-trustzone.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ
2*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ
3*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple=armv6kz -mcpu=arm1176jz-s -show-encoding < %s | FileCheck %s -check-prefix=TZ
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker  .syntax unified
6*9880d681SAndroid Build Coastguard Worker  .globl _func
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker@ Check that the assembler processes SMC instructions when TrustZone support is
9*9880d681SAndroid Build Coastguard Worker@ active and that it rejects them when this feature is not enabled
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker_func:
12*9880d681SAndroid Build Coastguard Worker@ CHECK: _func
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
16*9880d681SAndroid Build Coastguard Worker@ SMC
17*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
18*9880d681SAndroid Build Coastguard Worker        smi #0xf                        @ SMI is old (ARMv6KZ) name for SMC
19*9880d681SAndroid Build Coastguard Worker        smceq #0
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker@ NOTZ-NOT: smc 	#15
22*9880d681SAndroid Build Coastguard Worker@ NOTZ-NOT: smceq	#0
23*9880d681SAndroid Build Coastguard Worker@ TZ: smc	#15                     @ encoding: [0x7f,0x00,0x60,0xe1]
24*9880d681SAndroid Build Coastguard Worker@ TZ: smceq	#0                      @ encoding: [0x70,0x00,0x60,0x01]
25*9880d681SAndroid Build Coastguard Worker
26