xref: /aosp_15_r20/external/llvm/test/MC/ARM/arm-thumb-trustzone.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ
2*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ
3*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple=thumbv6kz -mcpu=arm1176jzf-s -show-encoding < %s | FileCheck %s -check-prefix=NOTZ
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        smc #0xf
19*9880d681SAndroid Build Coastguard Worker        ite eq
20*9880d681SAndroid Build Coastguard Worker        smceq #0
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker@ NOTZ-NOT: smc 	#15
23*9880d681SAndroid Build Coastguard Worker@ NOTZ-NOT: smceq	#0
24*9880d681SAndroid Build Coastguard Worker@ TZ: smc	#15                     @ encoding: [0xff,0xf7,0x00,0x80]
25*9880d681SAndroid Build Coastguard Worker@ TZ: ite	eq                      @ encoding: [0x0c,0xbf]
26*9880d681SAndroid Build Coastguard Worker@ TZ: smceq	#0                      @ encoding: [0xf0,0xf7,0x00,0x80]
27