• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
5// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
6// RUN:        | llvm-objdump -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9
10eor     z5.b, z5.b, #0xf9
11// CHECK-INST: eor     z5.b, z5.b, #0xf9
12// CHECK-ENCODING: [0xa5,0x2e,0x40,0x05]
13// CHECK-ERROR: instruction requires: sve
14// CHECK-UNKNOWN: a5 2e 40 05 <unknown>
15
16eor     z23.h, z23.h, #0xfff9
17// CHECK-INST: eor     z23.h, z23.h, #0xfff9
18// CHECK-ENCODING: [0xb7,0x6d,0x40,0x05]
19// CHECK-ERROR: instruction requires: sve
20// CHECK-UNKNOWN: b7 6d 40 05 <unknown>
21
22eor     z0.s, z0.s, #0xfffffff9
23// CHECK-INST: eor     z0.s, z0.s, #0xfffffff9
24// CHECK-ENCODING: [0xa0,0xeb,0x40,0x05]
25// CHECK-ERROR: instruction requires: sve
26// CHECK-UNKNOWN: a0 eb 40 05 <unknown>
27
28eor     z0.d, z0.d, #0xfffffffffffffff9
29// CHECK-INST: eor     z0.d, z0.d, #0xfffffffffffffff9
30// CHECK-ENCODING: [0xa0,0xef,0x43,0x05]
31// CHECK-ERROR: instruction requires: sve
32// CHECK-UNKNOWN: a0 ef 43 05 <unknown>
33
34eor     z5.b, z5.b, #0x6
35// CHECK-INST: eor     z5.b, z5.b, #0x6
36// CHECK-ENCODING: [0x25,0x3e,0x40,0x05]
37// CHECK-ERROR: instruction requires: sve
38// CHECK-UNKNOWN: 25 3e 40 05 <unknown>
39
40eor     z23.h, z23.h, #0x6
41// CHECK-INST: eor     z23.h, z23.h, #0x6
42// CHECK-ENCODING: [0x37,0x7c,0x40,0x05]
43// CHECK-ERROR: instruction requires: sve
44// CHECK-UNKNOWN: 37 7c 40 05 <unknown>
45
46eor     z0.s, z0.s, #0x6
47// CHECK-INST: eor     z0.s, z0.s, #0x6
48// CHECK-ENCODING: [0x20,0xf8,0x40,0x05]
49// CHECK-ERROR: instruction requires: sve
50// CHECK-UNKNOWN: 20 f8 40 05 <unknown>
51
52eor     z0.d, z0.d, #0x6
53// CHECK-INST: eor     z0.d, z0.d, #0x6
54// CHECK-ENCODING: [0x20,0xf8,0x43,0x05]
55// CHECK-ERROR: instruction requires: sve
56// CHECK-UNKNOWN: 20 f8 43 05 <unknown>
57
58eor     z23.d, z13.d, z8.d
59// CHECK-INST: eor     z23.d, z13.d, z8.d
60// CHECK-ENCODING: [0xb7,0x31,0xa8,0x04]
61// CHECK-ERROR: instruction requires: sve
62// CHECK-UNKNOWN: b7 31 a8 04 <unknown>
63
64eor     z0.d, z0.d, z0.d
65// CHECK-INST: eor     z0.d, z0.d, z0.d
66// CHECK-ENCODING: [0x00,0x30,0xa0,0x04]
67// CHECK-ERROR: instruction requires: sve
68// CHECK-UNKNOWN: 00 30 a0 04 <unknown>
69
70eor     z31.s, p7/m, z31.s, z31.s
71// CHECK-INST: eor     z31.s, p7/m, z31.s, z31.s
72// CHECK-ENCODING: [0xff,0x1f,0x99,0x04]
73// CHECK-ERROR: instruction requires: sve
74// CHECK-UNKNOWN: ff 1f 99 04 <unknown>
75
76eor     z31.h, p7/m, z31.h, z31.h
77// CHECK-INST: eor     z31.h, p7/m, z31.h, z31.h
78// CHECK-ENCODING: [0xff,0x1f,0x59,0x04]
79// CHECK-ERROR: instruction requires: sve
80// CHECK-UNKNOWN: ff 1f 59 04 <unknown>
81
82eor     z31.d, p7/m, z31.d, z31.d
83// CHECK-INST: eor     z31.d, p7/m, z31.d, z31.d
84// CHECK-ENCODING: [0xff,0x1f,0xd9,0x04]
85// CHECK-ERROR: instruction requires: sve
86// CHECK-UNKNOWN: ff 1f d9 04 <unknown>
87
88eor     z31.b, p7/m, z31.b, z31.b
89// CHECK-INST: eor     z31.b, p7/m, z31.b, z31.b
90// CHECK-ENCODING: [0xff,0x1f,0x19,0x04]
91// CHECK-ERROR: instruction requires: sve
92// CHECK-UNKNOWN: ff 1f 19 04 <unknown>
93
94eor     p0.b, p0/z, p0.b, p1.b
95// CHECK-INST: eor     p0.b, p0/z, p0.b, p1.b
96// CHECK-ENCODING: [0x00,0x42,0x01,0x25]
97// CHECK-ERROR: instruction requires: sve
98// CHECK-UNKNOWN: 00 42 01 25 <unknown>
99
100eor     p0.b, p0/z, p0.b, p0.b
101// CHECK-INST: not     p0.b, p0/z, p0.b
102// CHECK-ENCODING: [0x00,0x42,0x00,0x25]
103// CHECK-ERROR: instruction requires: sve
104// CHECK-UNKNOWN: 00 42 00 25 <unknown>
105
106eor     p15.b, p15/z, p15.b, p15.b
107// CHECK-INST: not     p15.b, p15/z, p15.b
108// CHECK-ENCODING: [0xef,0x7f,0x0f,0x25]
109// CHECK-ERROR: instruction requires: sve
110// CHECK-UNKNOWN: ef 7f 0f 25 <unknown>
111
112
113// --------------------------------------------------------------------------//
114// Test aliases.
115
116eor     z0.s, z0.s, z0.s
117// CHECK-INST: eor     z0.d, z0.d, z0.d
118// CHECK-ENCODING: [0x00,0x30,0xa0,0x04]
119// CHECK-ERROR: instruction requires: sve
120// CHECK-UNKNOWN: 00 30 a0 04 <unknown>
121
122eor     z0.h, z0.h, z0.h
123// CHECK-INST: eor     z0.d, z0.d, z0.d
124// CHECK-ENCODING: [0x00,0x30,0xa0,0x04]
125// CHECK-ERROR: instruction requires: sve
126// CHECK-UNKNOWN: 00 30 a0 04 <unknown>
127
128eor     z0.b, z0.b, z0.b
129// CHECK-INST: eor     z0.d, z0.d, z0.d
130// CHECK-ENCODING: [0x00,0x30,0xa0,0x04]
131// CHECK-ERROR: instruction requires: sve
132// CHECK-UNKNOWN: 00 30 a0 04 <unknown>
133
134
135// --------------------------------------------------------------------------//
136// Test compatibility with MOVPRFX instruction.
137
138movprfx z4.b, p7/z, z6.b
139// CHECK-INST: movprfx	z4.b, p7/z, z6.b
140// CHECK-ENCODING: [0xc4,0x3c,0x10,0x04]
141// CHECK-ERROR: instruction requires: sve
142// CHECK-UNKNOWN: c4 3c 10 04 <unknown>
143
144eor     z4.b, p7/m, z4.b, z31.b
145// CHECK-INST: eor	z4.b, p7/m, z4.b, z31.b
146// CHECK-ENCODING: [0xe4,0x1f,0x19,0x04]
147// CHECK-ERROR: instruction requires: sve
148// CHECK-UNKNOWN: e4 1f 19 04 <unknown>
149
150movprfx z4, z6
151// CHECK-INST: movprfx	z4, z6
152// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]
153// CHECK-ERROR: instruction requires: sve
154// CHECK-UNKNOWN: c4 bc 20 04 <unknown>
155
156eor     z4.b, p7/m, z4.b, z31.b
157// CHECK-INST: eor	z4.b, p7/m, z4.b, z31.b
158// CHECK-ENCODING: [0xe4,0x1f,0x19,0x04]
159// CHECK-ERROR: instruction requires: sve
160// CHECK-UNKNOWN: e4 1f 19 04 <unknown>
161
162movprfx z0, z7
163// CHECK-INST: movprfx	z0, z7
164// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
165// CHECK-ERROR: instruction requires: sve
166// CHECK-UNKNOWN: e0 bc 20 04 <unknown>
167
168eor     z0.d, z0.d, #0x6
169// CHECK-INST: eor	z0.d, z0.d, #0x6
170// CHECK-ENCODING: [0x20,0xf8,0x43,0x05]
171// CHECK-ERROR: instruction requires: sve
172// CHECK-UNKNOWN: 20 f8 43 05 <unknown>
173