• 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
10and     z5.b, z5.b, #0xf9
11// CHECK-INST: and     z5.b, z5.b, #0xf9
12// CHECK-ENCODING: [0xa5,0x2e,0x80,0x05]
13// CHECK-ERROR: instruction requires: sve
14// CHECK-UNKNOWN: a5 2e 80 05 <unknown>
15
16and     z23.h, z23.h, #0xfff9
17// CHECK-INST: and     z23.h, z23.h, #0xfff9
18// CHECK-ENCODING: [0xb7,0x6d,0x80,0x05]
19// CHECK-ERROR: instruction requires: sve
20// CHECK-UNKNOWN: b7 6d 80 05 <unknown>
21
22and     z0.s, z0.s, #0xfffffff9
23// CHECK-INST: and     z0.s, z0.s, #0xfffffff9
24// CHECK-ENCODING: [0xa0,0xeb,0x80,0x05]
25// CHECK-ERROR: instruction requires: sve
26// CHECK-UNKNOWN: a0 eb 80 05 <unknown>
27
28and     z0.d, z0.d, #0xfffffffffffffff9
29// CHECK-INST: and     z0.d, z0.d, #0xfffffffffffffff9
30// CHECK-ENCODING: [0xa0,0xef,0x83,0x05]
31// CHECK-ERROR: instruction requires: sve
32// CHECK-UNKNOWN: a0 ef 83 05 <unknown>
33
34and     z5.b, z5.b, #0x6
35// CHECK-INST: and     z5.b, z5.b, #0x6
36// CHECK-ENCODING: [0x25,0x3e,0x80,0x05]
37// CHECK-ERROR: instruction requires: sve
38// CHECK-UNKNOWN: 25 3e 80 05 <unknown>
39
40and     z23.h, z23.h, #0x6
41// CHECK-INST: and     z23.h, z23.h, #0x6
42// CHECK-ENCODING: [0x37,0x7c,0x80,0x05]
43// CHECK-ERROR: instruction requires: sve
44// CHECK-UNKNOWN: 37 7c 80 05 <unknown>
45
46and     z0.s, z0.s, #0x6
47// CHECK-INST: and     z0.s, z0.s, #0x6
48// CHECK-ENCODING: [0x20,0xf8,0x80,0x05]
49// CHECK-ERROR: instruction requires: sve
50// CHECK-UNKNOWN: 20 f8 80 05 <unknown>
51
52and     z0.d, z0.d, #0x6
53// CHECK-INST: and     z0.d, z0.d, #0x6
54// CHECK-ENCODING: [0x20,0xf8,0x83,0x05]
55// CHECK-ERROR: instruction requires: sve
56// CHECK-UNKNOWN: 20 f8 83 05 <unknown>
57
58and     z0.d, z0.d, z0.d
59// CHECK-INST: and     z0.d, z0.d, z0.d
60// CHECK-ENCODING: [0x00,0x30,0x20,0x04]
61// CHECK-ERROR: instruction requires: sve
62// CHECK-UNKNOWN: 00 30 20 04 <unknown>
63
64and     z23.d, z13.d, z8.d
65// CHECK-INST: and     z23.d, z13.d, z8.d
66// CHECK-ENCODING: [0xb7,0x31,0x28,0x04]
67// CHECK-ERROR: instruction requires: sve
68// CHECK-UNKNOWN: b7 31 28 04 <unknown>
69
70and     z31.b, p7/m, z31.b, z31.b
71// CHECK-INST: and     z31.b, p7/m, z31.b, z31.b
72// CHECK-ENCODING: [0xff,0x1f,0x1a,0x04]
73// CHECK-ERROR: instruction requires: sve
74// CHECK-UNKNOWN: ff 1f 1a 04 <unknown>
75
76and     z31.h, p7/m, z31.h, z31.h
77// CHECK-INST: and     z31.h, p7/m, z31.h, z31.h
78// CHECK-ENCODING: [0xff,0x1f,0x5a,0x04]
79// CHECK-ERROR: instruction requires: sve
80// CHECK-UNKNOWN: ff 1f 5a 04 <unknown>
81
82and     z31.s, p7/m, z31.s, z31.s
83// CHECK-INST: and     z31.s, p7/m, z31.s, z31.s
84// CHECK-ENCODING: [0xff,0x1f,0x9a,0x04]
85// CHECK-ERROR: instruction requires: sve
86// CHECK-UNKNOWN: ff 1f 9a 04 <unknown>
87
88and     z31.d, p7/m, z31.d, z31.d
89// CHECK-INST: and     z31.d, p7/m, z31.d, z31.d
90// CHECK-ENCODING: [0xff,0x1f,0xda,0x04]
91// CHECK-ERROR: instruction requires: sve
92// CHECK-UNKNOWN: ff 1f da 04 <unknown>
93
94and     p0.b, p0/z, p0.b, p1.b
95// CHECK-INST: and     p0.b, p0/z, p0.b, p1.b
96// CHECK-ENCODING: [0x00,0x40,0x01,0x25]
97// CHECK-ERROR: instruction requires: sve
98// CHECK-UNKNOWN: 00 40 01 25 <unknown>
99
100and     p0.b, p0/z, p0.b, p0.b
101// CHECK-INST: mov     p0.b, p0/z, p0.b
102// CHECK-ENCODING: [0x00,0x40,0x00,0x25]
103// CHECK-ERROR: instruction requires: sve
104// CHECK-UNKNOWN: 00 40 00 25 <unknown>
105
106and     p15.b, p15/z, p15.b, p15.b
107// CHECK-INST: mov     p15.b, p15/z, p15.b
108// CHECK-ENCODING: [0xef,0x7d,0x0f,0x25]
109// CHECK-ERROR: instruction requires: sve
110// CHECK-UNKNOWN: ef 7d 0f 25 <unknown>
111
112
113// --------------------------------------------------------------------------//
114// Test compatibility with MOVPRFX instruction.
115
116movprfx z4.d, p7/z, z6.d
117// CHECK-INST: movprfx	z4.d, p7/z, z6.d
118// CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04]
119// CHECK-ERROR: instruction requires: sve
120// CHECK-UNKNOWN: c4 3c d0 04 <unknown>
121
122and     z4.d, p7/m, z4.d, z31.d
123// CHECK-INST: and	z4.d, p7/m, z4.d, z31.d
124// CHECK-ENCODING: [0xe4,0x1f,0xda,0x04]
125// CHECK-ERROR: instruction requires: sve
126// CHECK-UNKNOWN: e4 1f da 04 <unknown>
127
128movprfx z4, z6
129// CHECK-INST: movprfx	z4, z6
130// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]
131// CHECK-ERROR: instruction requires: sve
132// CHECK-UNKNOWN: c4 bc 20 04 <unknown>
133
134and     z4.d, p7/m, z4.d, z31.d
135// CHECK-INST: and	z4.d, p7/m, z4.d, z31.d
136// CHECK-ENCODING: [0xe4,0x1f,0xda,0x04]
137// CHECK-ERROR: instruction requires: sve
138// CHECK-UNKNOWN: e4 1f da 04 <unknown>
139
140movprfx z0, z7
141// CHECK-INST: movprfx	z0, z7
142// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
143// CHECK-ERROR: instruction requires: sve
144// CHECK-UNKNOWN: e0 bc 20 04 <unknown>
145
146and     z0.d, z0.d, #0x6
147// CHECK-INST: and	z0.d, z0.d, #0x6
148// CHECK-ENCODING: [0x20,0xf8,0x83,0x05]
149// CHECK-ERROR: instruction requires: sve
150// CHECK-UNKNOWN: 20 f8 83 05 <unknown>
151