• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@ New ARMv8 T32 encodings
2
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
5
6@ HLT
7        hlt  #0
8        hlt  #63
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
13
14@ In IT block
15        it pl
16        hlt #24
17
18@ CHECK-V8: it pl                         @ encoding: [0x58,0xbf]
19@ CHECK-V8: hlt #24                       @ encoding: [0x98,0xba]
20@ CHECK-V7: error: instruction requires: armv8
21
22@ Can accept AL condition code
23        hltal #24
24@ CHECK-V8: hlt #24                       @ encoding: [0x98,0xba]
25@ CHECK-V7: error: instruction requires: armv8
26
27@ DCPS{1,2,3}
28        dcps1
29        dcps2
30        dcps3
31@ CHECK-V8: dcps1                         @ encoding: [0x8f,0xf7,0x01,0x80]
32@ CHECK-V8: dcps2                         @ encoding: [0x8f,0xf7,0x02,0x80]
33@ CHECK-V8: dcps3                         @ encoding: [0x8f,0xf7,0x03,0x80]
34@ CHECK-V7: error: instruction requires: armv8
35@ CHECK-V7: error: instruction requires: armv8
36@ CHECK-V7: error: instruction requires: armv8
37
38@------------------------------------------------------------------------------
39@ DMB (v8 barriers)
40@------------------------------------------------------------------------------
41        dmb ishld
42        dmb oshld
43        dmb nshld
44        dmb ld
45
46@ CHECK-V8: dmb ishld @ encoding: [0xbf,0xf3,0x59,0x8f]
47@ CHECK-V8: dmb oshld @ encoding: [0xbf,0xf3,0x51,0x8f]
48@ CHECK-V8: dmb nshld @ encoding: [0xbf,0xf3,0x55,0x8f]
49@ CHECK-V8: dmb ld @ encoding: [0xbf,0xf3,0x5d,0x8f]
50@ CHECK-V7: error: invalid operand for instruction
51@ CHECK-V7: error: invalid operand for instruction
52@ CHECK-V7: error: invalid operand for instruction
53@ CHECK-V7: error: invalid operand for instruction
54
55@------------------------------------------------------------------------------
56@ DSB (v8 barriers)
57@------------------------------------------------------------------------------
58        dsb ishld
59        dsb oshld
60        dsb nshld
61        dsb ld
62
63@ CHECK-V8: dsb ishld @ encoding: [0xbf,0xf3,0x49,0x8f]
64@ CHECK-V8: dsb oshld @ encoding: [0xbf,0xf3,0x41,0x8f]
65@ CHECK-V8: dsb nshld @ encoding: [0xbf,0xf3,0x45,0x8f]
66@ CHECK-V8: dsb ld @ encoding: [0xbf,0xf3,0x4d,0x8f]
67@ CHECK-V7: error: invalid operand for instruction
68@ CHECK-V7: error: invalid operand for instruction
69@ CHECK-V7: error: invalid operand for instruction
70@ CHECK-V7: error: invalid operand for instruction
71
72@------------------------------------------------------------------------------
73@ SEVL
74@------------------------------------------------------------------------------
75        sevl
76        sevl.w
77        it ge
78        sevlge
79
80@ CHECK-V8: sevl @ encoding: [0x50,0xbf]
81@ CHECK-V8: sevl.w @ encoding: [0xaf,0xf3,0x05,0x80]
82@ CHECK-V8: it ge @ encoding: [0xa8,0xbf]
83@ CHECK-V8: sevlge @ encoding: [0x50,0xbf]
84@ CHECK-V7: error: instruction requires: armv8
85@ CHECK-V7: error: instruction requires: armv8
86@ CHECK-V7: error:
87@ CHECK-V7: error: instruction requires: armv8
88