173477b9f32da6488f2883f33fd17fa0de61f2bd1Rafael Espindola@ RUN: not llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ
28c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ
38c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover
48c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover  .syntax unified
58c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover  .globl _func
68c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover
78c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ Check that the assembler processes SMC instructions when TrustZone support is
88c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ active and that it rejects them when this feature is not enabled
98c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover
108c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover_func:
118c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ CHECK: _func
128c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover
138c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover
148c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@------------------------------------------------------------------------------
158c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ SMC
168c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@------------------------------------------------------------------------------
178c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover        smc #0xf
188c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover        smceq #0
198c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover
208c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ NOTZ-NOT: smc 	#15
218c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ NOTZ-NOT: smceq	#0
228c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ TZ: smc	#15                     @ encoding: [0x7f,0x00,0x60,0xe1]
238c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover@ TZ: smceq	#0                      @ encoding: [0x70,0x00,0x60,0x01]
248c9e52a9fc1f99cf80c499ef10e6c8a54ef899d4Tim Northover
25