xref: /llvm-project/llvm/test/MC/AArch64/SVE2p1/dupq.s (revision 8f60eee9144cd4178938d231ecccb65c43f78cde)
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p1 < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p1 < %s \
4// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2p1 < %s \
8// RUN:        | llvm-objdump -d --no-print-imm-hex --mattr=+sme2p1 - | FileCheck %s --check-prefix=CHECK-INST
9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2p1 < %s \
10// RUN:        | llvm-objdump -d --mattr=-sme2p1,-sve2p1 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p1 < %s \
12// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
13// RUN:        | llvm-mc -triple=aarch64 -mattr=+sme2p1 -disassemble -show-encoding \
14// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
15
16
17dupq    z0.h, z0.h[0]  // 00000101-00100010-00100100-00000000
18// CHECK-INST: dupq    z0.h, z0.h[0]
19// CHECK-ENCODING: [0x00,0x24,0x22,0x05]
20// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
21// CHECK-UNKNOWN: 05222400 <unknown>
22
23dupq    z21.h, z10.h[5]  // 00000101-00110110-00100101-01010101
24// CHECK-INST: dupq    z21.h, z10.h[5]
25// CHECK-ENCODING: [0x55,0x25,0x36,0x05]
26// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
27// CHECK-UNKNOWN: 05362555 <unknown>
28
29dupq    z23.h, z13.h[2]  // 00000101-00101010-00100101-10110111
30// CHECK-INST: dupq    z23.h, z13.h[2]
31// CHECK-ENCODING: [0xb7,0x25,0x2a,0x05]
32// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
33// CHECK-UNKNOWN: 052a25b7 <unknown>
34
35dupq    z31.h, z31.h[7]  // 00000101-00111110-00100111-11111111
36// CHECK-INST: dupq    z31.h, z31.h[7]
37// CHECK-ENCODING: [0xff,0x27,0x3e,0x05]
38// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
39// CHECK-UNKNOWN: 053e27ff <unknown>
40
41
42dupq    z0.s, z0.s[0]  // 00000101-00100100-00100100-00000000
43// CHECK-INST: dupq    z0.s, z0.s[0]
44// CHECK-ENCODING: [0x00,0x24,0x24,0x05]
45// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
46// CHECK-UNKNOWN: 05242400 <unknown>
47
48dupq    z21.s, z10.s[2]  // 00000101-00110100-00100101-01010101
49// CHECK-INST: dupq    z21.s, z10.s[2]
50// CHECK-ENCODING: [0x55,0x25,0x34,0x05]
51// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
52// CHECK-UNKNOWN: 05342555 <unknown>
53
54dupq    z23.s, z13.s[1]  // 00000101-00101100-00100101-10110111
55// CHECK-INST: dupq    z23.s, z13.s[1]
56// CHECK-ENCODING: [0xb7,0x25,0x2c,0x05]
57// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
58// CHECK-UNKNOWN: 052c25b7 <unknown>
59
60dupq    z31.s, z31.s[3]  // 00000101-00111100-00100111-11111111
61// CHECK-INST: dupq    z31.s, z31.s[3]
62// CHECK-ENCODING: [0xff,0x27,0x3c,0x05]
63// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
64// CHECK-UNKNOWN: 053c27ff <unknown>
65
66
67dupq    z0.d, z0.d[0]  // 00000101-00101000-00100100-00000000
68// CHECK-INST: dupq    z0.d, z0.d[0]
69// CHECK-ENCODING: [0x00,0x24,0x28,0x05]
70// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
71// CHECK-UNKNOWN: 05282400 <unknown>
72
73dupq    z21.d, z10.d[1]  // 00000101-00111000-00100101-01010101
74// CHECK-INST: dupq    z21.d, z10.d[1]
75// CHECK-ENCODING: [0x55,0x25,0x38,0x05]
76// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
77// CHECK-UNKNOWN: 05382555 <unknown>
78
79dupq    z23.d, z13.d[0]  // 00000101-00101000-00100101-10110111
80// CHECK-INST: dupq    z23.d, z13.d[0]
81// CHECK-ENCODING: [0xb7,0x25,0x28,0x05]
82// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
83// CHECK-UNKNOWN: 052825b7 <unknown>
84
85dupq    z31.d, z31.d[1]  // 00000101-00111000-00100111-11111111
86// CHECK-INST: dupq    z31.d, z31.d[1]
87// CHECK-ENCODING: [0xff,0x27,0x38,0x05]
88// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
89// CHECK-UNKNOWN: 053827ff <unknown>
90
91
92dupq    z0.b, z0.b[0]  // 00000101-00100001-00100100-00000000
93// CHECK-INST: dupq    z0.b, z0.b[0]
94// CHECK-ENCODING: [0x00,0x24,0x21,0x05]
95// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
96// CHECK-UNKNOWN: 05212400 <unknown>
97
98dupq    z21.b, z10.b[10]  // 00000101-00110101-00100101-01010101
99// CHECK-INST: dupq    z21.b, z10.b[10]
100// CHECK-ENCODING: [0x55,0x25,0x35,0x05]
101// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
102// CHECK-UNKNOWN: 05352555 <unknown>
103
104dupq    z23.b, z13.b[4]  // 00000101-00101001-00100101-10110111
105// CHECK-INST: dupq    z23.b, z13.b[4]
106// CHECK-ENCODING: [0xb7,0x25,0x29,0x05]
107// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
108// CHECK-UNKNOWN: 052925b7 <unknown>
109
110dupq    z31.b, z31.b[15]  // 00000101-00111111-00100111-11111111
111// CHECK-INST: dupq    z31.b, z31.b[15]
112// CHECK-ENCODING: [0xff,0x27,0x3f,0x05]
113// CHECK-ERROR: instruction requires: sme2p1 or sve2p1
114// CHECK-UNKNOWN: 053f27ff <unknown>
115
116