1 @ New ARMv8 T32 encodings
3 @ RUN: llvm-mc -triple thumbv8 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-V8
4 @ RUN: not llvm-mc -triple thumbv7 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V7
9 @ CHECK-V8: hlt #0 @ encoding: [0x80,0xba]
10 @ CHECK-V8: hlt #63 @ encoding: [0xbf,0xba]
11 @ CHECK-V7: error: instruction requires: armv8
12 @ CHECK-V7: error: instruction requires: armv8
18 @ CHECK-V8: it pl @ encoding: [0x58,0xbf]
19 @ CHECK-V8: hlt #24 @ encoding: [0x98,0xba]
20 @ CHECK-V7: error: instruction requires: armv8
22 @ Can accept AL condition code (in ARMv8 only)
24 @ CHECK-V8: hlt #24 @ encoding: [0x98,0xba]
25 @ CHECK-V7: error: instruction requires: armv8
27 @ Can accept SP as rGPR (in ARMv8 only)
28 sbc.w r6, r3, sp, asr #16
29 and.w r6, r3, sp, asr #16
31 @ CHECK-V8: sbc.w r6, r3, sp, asr #16 @ encoding: [0x63,0xeb,0x2d,0x46]
32 @ CHECK-V8: and.w r6, r3, sp, asr #16 @ encoding: [0x03,0xea,0x2d,0x46]
33 @ CHECK-V8: and sp, r0, #0 @ encoding: [0x00,0xf0,0x00,0x0d]
34 @ CHECK-V7: error: instruction variant requires ARMv8 or later
35 @ CHECK-V7: error: instruction variant requires ARMv8 or later
36 @ CHECK-V7: error: invalid operand for instruction
38 @ DCPS{1,2,3} (in ARMv8 only)
42 @ CHECK-V8: dcps1 @ encoding: [0x8f,0xf7,0x01,0x80]
43 @ CHECK-V8: dcps2 @ encoding: [0x8f,0xf7,0x02,0x80]
44 @ CHECK-V8: dcps3 @ encoding: [0x8f,0xf7,0x03,0x80]
45 @ CHECK-V7: error: instruction requires: armv8
46 @ CHECK-V7: error: instruction requires: armv8
47 @ CHECK-V7: error: instruction requires: armv8
49 @------------------------------------------------------------------------------
50 @ DMB (ARMv8-only barriers)
51 @------------------------------------------------------------------------------
57 @ CHECK-V8: dmb ishld @ encoding: [0xbf,0xf3,0x59,0x8f]
58 @ CHECK-V8: dmb oshld @ encoding: [0xbf,0xf3,0x51,0x8f]
59 @ CHECK-V8: dmb nshld @ encoding: [0xbf,0xf3,0x55,0x8f]
60 @ CHECK-V8: dmb ld @ encoding: [0xbf,0xf3,0x5d,0x8f]
61 @ CHECK-V7: error: invalid operand for instruction
62 @ CHECK-V7: error: invalid operand for instruction
63 @ CHECK-V7: error: invalid operand for instruction
64 @ CHECK-V7: error: invalid operand for instruction
66 @------------------------------------------------------------------------------
67 @ DSB (ARMv8-only barriers)
68 @------------------------------------------------------------------------------
74 @ CHECK-V8: dsb ishld @ encoding: [0xbf,0xf3,0x49,0x8f]
75 @ CHECK-V8: dsb oshld @ encoding: [0xbf,0xf3,0x41,0x8f]
76 @ CHECK-V8: dsb nshld @ encoding: [0xbf,0xf3,0x45,0x8f]
77 @ CHECK-V8: dsb ld @ encoding: [0xbf,0xf3,0x4d,0x8f]
78 @ CHECK-V7: error: invalid operand for instruction
79 @ CHECK-V7: error: invalid operand for instruction
80 @ CHECK-V7: error: invalid operand for instruction
81 @ CHECK-V7: error: invalid operand for instruction
83 @------------------------------------------------------------------------------
84 @ SEVL (in ARMv8 only)
85 @------------------------------------------------------------------------------
91 @ CHECK-V8: sevl @ encoding: [0x50,0xbf]
92 @ CHECK-V8: sevl.w @ encoding: [0xaf,0xf3,0x05,0x80]
93 @ CHECK-V8: it ge @ encoding: [0xa8,0xbf]
94 @ CHECK-V8: sevlge @ encoding: [0x50,0xbf]
95 @ CHECK-V7: error: instruction requires: armv8
96 @ CHECK-V7: error: instruction requires: armv8
98 @ CHECK-V7: error: instruction requires: armv8