xref: /llvm-project/llvm/test/MC/AArch64/FP8_SVE2/fmlall.s (revision 6477b41a0b56919c42f44c3499ed32720101b43b)
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+ssve-fp8fma < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3
4// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
5// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
6
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2,+fp8fma < %s \
8// RUN:        | llvm-objdump -d --mattr=+sve2,+fp8fma --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST
9
10// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2,+fp8fma < %s \
11// RUN:        | llvm-objdump -d --mattr=-sve2 --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN
12
13// Disassemble encoding and check the re-encoding (-show-encoding) matches.
14// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2,+fp8fma < %s \
15// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
16// RUN:        | llvm-mc -triple=aarch64 -mattr=+sve2,+fp8fma -disassemble -show-encoding \
17// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
18
19//
20// FMLALLBB instructions
21//
22// fmlallbb - indexed
23
24fmlallbb z0.s, z0.b, z0.b[0]  // 01100100-00100000-11000000-00000000
25// CHECK-INST: fmlallbb z0.s, z0.b, z0.b[0]
26// CHECK-ENCODING: [0x00,0xc0,0x20,0x64]
27// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
28// CHECK-UNKNOWN: 6420c000 <unknown>
29
30movprfx z23, z31
31fmlallbb z23.s, z13.b, z0.b[7]  // 01100100-00101000-11001101-10110111
32// CHECK-INST:  movprfx z23, z31
33// CHECK-INST: fmlallbb z23.s, z13.b, z0.b[7]
34// CHECK-ENCODING: [0xb7,0xcd,0x28,0x64]
35// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
36// CHECK-UNKNOWN: 6428cdb7 <unknown>
37
38fmlallbb z31.s, z31.b, z7.b[15]  // 01100100-00111111-11001111-11111111
39// CHECK-INST: fmlallbb z31.s, z31.b, z7.b[15]
40// CHECK-ENCODING: [0xff,0xcf,0x3f,0x64]
41// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
42// CHECK-UNKNOWN: 643fcfff <unknown>
43
44//
45// FMLALLBB instructions
46//
47// fmlallbb - group
48
49fmlallbb z0.s, z0.b, z0.b  // 01100100-00100000-10001000-00000000
50// CHECK-INST: fmlallbb z0.s, z0.b, z0.b
51// CHECK-ENCODING: [0x00,0x88,0x20,0x64]
52// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
53// CHECK-UNKNOWN: 64208800 <unknown>
54
55movprfx z23, z31
56fmlallbb z23.s, z13.b, z8.b  // 01100100-00101000-10001001-10110111
57// CHECK-INST:  movprfx z23, z31
58// CHECK-INST: fmlallbb z23.s, z13.b, z8.b
59// CHECK-ENCODING: [0xb7,0x89,0x28,0x64]
60// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
61// CHECK-UNKNOWN: 642889b7 <unknown>
62
63fmlallbb z31.s, z31.b, z31.b  // 01100100-00111111-10001011-11111111
64// CHECK-INST: fmlallbb z31.s, z31.b, z31.b
65// CHECK-ENCODING: [0xff,0x8b,0x3f,0x64]
66// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
67// CHECK-UNKNOWN: 643f8bff <unknown>
68
69//--------------------------------------------//
70//
71// FMLALLBT instructions
72//
73// fmlallbt - indexed
74
75fmlallbt z0.s, z0.b, z0.b[0]  // 01100100-01100000-11000000-00000000
76// CHECK-INST: fmlallbt z0.s, z0.b, z0.b[0]
77// CHECK-ENCODING: [0x00,0xc0,0x60,0x64]
78// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
79// CHECK-UNKNOWN: 6460c000 <unknown>
80
81movprfx z23, z31
82fmlallbt z23.s, z13.b, z0.b[7]  // 01100100-01101000-11001101-10110111
83// CHECK-INST:  movprfx z23, z31
84// CHECK-INST: fmlallbt z23.s, z13.b, z0.b[7]
85// CHECK-ENCODING: [0xb7,0xcd,0x68,0x64]
86// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
87// CHECK-UNKNOWN: 6468cdb7 <unknown>
88
89fmlallbt z31.s, z31.b, z7.b[15]  // 01100100-01111111-11001111-11111111
90// CHECK-INST: fmlallbt z31.s, z31.b, z7.b[15]
91// CHECK-ENCODING: [0xff,0xcf,0x7f,0x64]
92// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
93// CHECK-UNKNOWN: 647fcfff <unknown>
94
95//
96// FMLALLBT instructions
97//
98// fmlallbt - group
99
100fmlallbt z0.s, z0.b, z0.b  // 01100100-00100000-10011000-00000000
101// CHECK-INST: fmlallbt z0.s, z0.b, z0.b
102// CHECK-ENCODING: [0x00,0x98,0x20,0x64]
103// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
104// CHECK-UNKNOWN: 64209800 <unknown>
105
106movprfx z23, z31
107fmlallbt z23.s, z13.b, z8.b  // 01100100-00101000-10011001-10110111
108// CHECK-INST:  movprfx z23, z31
109// CHECK-INST: fmlallbt z23.s, z13.b, z8.b
110// CHECK-ENCODING: [0xb7,0x99,0x28,0x64]
111// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
112// CHECK-UNKNOWN: 642899b7 <unknown>
113
114fmlallbt z31.s, z31.b, z31.b  // 01100100-00111111-10011011-11111111
115// CHECK-INST: fmlallbt z31.s, z31.b, z31.b
116// CHECK-ENCODING: [0xff,0x9b,0x3f,0x64]
117// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
118// CHECK-UNKNOWN: 643f9bff <unknown>
119
120//--------------------------------------------//
121//
122// FMLALLTB instructions
123//
124// fmlalltb - indexed
125
126fmlalltb z0.s, z0.b, z0.b[0]  // 01100100-10100000-11000000-00000000
127// CHECK-INST: fmlalltb z0.s, z0.b, z0.b[0]
128// CHECK-ENCODING: [0x00,0xc0,0xa0,0x64]
129// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
130// CHECK-UNKNOWN: 64a0c000 <unknown>
131
132movprfx z23, z31
133fmlalltb z23.s, z13.b, z0.b[7]  // 01100100-10101000-11001101-10110111
134// CHECK-INST:  movprfx z23, z31
135// CHECK-INST: fmlalltb z23.s, z13.b, z0.b[7]
136// CHECK-ENCODING: [0xb7,0xcd,0xa8,0x64]
137// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
138// CHECK-UNKNOWN: 64a8cdb7 <unknown>
139
140fmlalltb z31.s, z31.b, z7.b[15]  // 01100100-10111111-11001111-11111111
141// CHECK-INST: fmlalltb z31.s, z31.b, z7.b[15]
142// CHECK-ENCODING: [0xff,0xcf,0xbf,0x64]
143// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
144// CHECK-UNKNOWN: 64bfcfff <unknown>
145
146//
147// FMLALLTB instructions
148//
149// fmlalltb - group
150
151fmlalltb z0.s, z0.b, z0.b  // 01100100-00100000-10101000-00000000
152// CHECK-INST: fmlalltb z0.s, z0.b, z0.b
153// CHECK-ENCODING: [0x00,0xa8,0x20,0x64]
154// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
155// CHECK-UNKNOWN: 6420a800 <unknown>
156
157movprfx z23, z31
158fmlalltb z23.s, z13.b, z8.b  // 01100100-00101000-10101001-10110111
159// CHECK-INST:  movprfx z23, z31
160// CHECK-INST: fmlalltb z23.s, z13.b, z8.b
161// CHECK-ENCODING: [0xb7,0xa9,0x28,0x64]
162// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
163// CHECK-UNKNOWN: 6428a9b7 <unknown>
164
165fmlalltb z31.s, z31.b, z31.b  // 01100100-00111111-10101011-11111111
166// CHECK-INST: fmlalltb z31.s, z31.b, z31.b
167// CHECK-ENCODING: [0xff,0xab,0x3f,0x64]
168// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
169// CHECK-UNKNOWN: 643fabff <unknown>
170
171
172//--------------------------------------------//
173//
174// FMLALLTT instructions
175//
176// fmlalltt - indexed
177
178fmlalltt z0.s, z0.b, z0.b[0]  // 01100100-11100000-11000000-00000000
179// CHECK-INST: fmlalltt z0.s, z0.b, z0.b[0]
180// CHECK-ENCODING: [0x00,0xc0,0xe0,0x64]
181// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
182// CHECK-UNKNOWN: 64e0c000 <unknown>
183
184movprfx z23, z31
185fmlalltt z23.s, z13.b, z0.b[7]  // 01100100-11101000-11001101-10110111
186// CHECK-INST:  movprfx z23, z31
187// CHECK-INST: fmlalltt z23.s, z13.b, z0.b[7]
188// CHECK-ENCODING: [0xb7,0xcd,0xe8,0x64]
189// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
190// CHECK-UNKNOWN: 64e8cdb7 <unknown>
191
192fmlalltt z31.s, z31.b, z7.b[15]  // 01100100-11111111-11001111-11111111
193// CHECK-INST: fmlalltt z31.s, z31.b, z7.b[15]
194// CHECK-ENCODING: [0xff,0xcf,0xff,0x64]
195// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
196// CHECK-UNKNOWN: 64ffcfff <unknown>
197
198
199//
200// FMLALLTT instructions
201//
202// fmlalltt - group
203
204fmlalltt z0.s, z0.b, z0.b  // 01100100-00100000-10111000-00000000
205// CHECK-INST: fmlalltt z0.s, z0.b, z0.b
206// CHECK-ENCODING: [0x00,0xb8,0x20,0x64]
207// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
208// CHECK-UNKNOWN: 6420b800 <unknown>
209
210movprfx z23, z31
211fmlalltt z23.s, z13.b, z8.b  // 01100100-00101000-10111001-10110111
212// CHECK-INST:  movprfx z23, z31
213// CHECK-INST: fmlalltt z23.s, z13.b, z8.b
214// CHECK-ENCODING: [0xb7,0xb9,0x28,0x64]
215// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
216// CHECK-UNKNOWN: 6428b9b7 <unknown>
217
218fmlalltt z31.s, z31.b, z31.b  // 01100100-00111111-10111011-11111111
219// CHECK-INST: fmlalltt z31.s, z31.b, z31.b
220// CHECK-ENCODING: [0xff,0xbb,0x3f,0x64]
221// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma)
222// CHECK-UNKNOWN: 643fbbff <unknown>
223