1 /*
2 * Copyright (c) 2021 Arm Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 * IN THE SOFTWARE.
23 */
24 #ifdef ARM_COMPUTE_ENABLE_SVE
25
26 #include "arm_gemm.hpp"
27 #include "../../utils.hpp"
28
29 #include <cassert>
30
31 namespace arm_gemm {
32
sve_hybrid_u8u32_dot_6x4VL(unsigned int num_strings,const unsigned int * string_lengths,IndirectInputArg<uint8_t> A_arg,size_t M,size_t N,const uint8_t * B_ptr,IndirectOutputArg<uint32_t> output_arg,const uint32_t *,Activation,bool accumulate)33 void sve_hybrid_u8u32_dot_6x4VL (
34 unsigned int num_strings, const unsigned int *string_lengths, IndirectInputArg<uint8_t> A_arg,
35 size_t M, size_t N, const uint8_t *B_ptr, IndirectOutputArg<uint32_t> output_arg,
36 const uint32_t *, Activation, bool accumulate
37 )
38 {
39 struct KernelArgs {
40 unsigned int num_strings = {};
41 const unsigned int *string_lengths = {};
42 size_t N = {};
43 const uint8_t *B_ptr = {};
44 size_t output_offset = {};
45 size_t input_initial_col = {};
46 size_t input_offset = {};
47 } ka;
48
49 unsigned long flags=0;
50 void *output_ptr;
51 void *input_ptr;
52
53 if (output_arg.is_indirect) {
54 output_ptr=(void *)(output_arg.indirect.ptr);
55 ka.output_offset=output_arg.indirect.offset;
56 flags |= 0x4;
57 } else {
58 output_ptr=(void *)(output_arg.direct.base);
59 ka.output_offset=output_arg.direct.stride;
60 }
61
62 if (A_arg.is_indirect) {
63 input_ptr=(void *)(A_arg.indirect.ptr);
64 ka.input_offset=A_arg.indirect.start_row;
65 ka.input_initial_col=A_arg.indirect.start_col;
66 flags |= 0x8;
67 } else {
68 assert(num_strings==1);
69 input_ptr=(void *)(A_arg.direct.base);
70 ka.input_offset=A_arg.direct.stride;
71 }
72 if (accumulate) {
73 flags |= 0x1;
74 }
75 ka.num_strings = num_strings;
76 ka.string_lengths = string_lengths;
77 ka.N = N;
78 ka.B_ptr = B_ptr;
79 __asm__ __volatile__(
80 "ptrue p5.b\n"
81 "1:" // Row loop
82 "cmp %x[M], #0x6\n"
83 "bge 56f\n"
84 "cmp %x[M], #0x4\n"
85 "bgt 45f\n"
86 "beq 34f\n"
87 "cmp %x[M], #0x2\n"
88 "bgt 23f\n"
89 "beq 12f\n"
90 "ldr x10, [%x[args_ptr], %[offsetof_N]]\n"
91 "ldr x9, [%x[args_ptr], %[offsetof_B_ptr]]\n"
92 "mov x28, %x[output_ptr]\n"
93 "2:" // Height 1: Column loop
94 "mov x19, #0x0\n"
95 "whilelt p4.s, x19, x10\n"
96 "incw x19\n"
97 "whilelt p3.s, x19, x10\n"
98 "incw x19\n"
99 "whilelt p2.s, x19, x10\n"
100 "incw x19\n"
101 "whilelt p1.s, x19, x10\n"
102 "tbz %x[flags], #0, 3f\n"
103 "ld1w { z8.s }, p4/Z, [x28]\n"
104 "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
105 "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
106 "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
107 "b 4f\n"
108 "3:" // Height 1: no accumulate
109 "mov z8.s, #0x0\n"
110 "mov z9.s, #0x0\n"
111 "mov z10.s, #0x0\n"
112 "mov z11.s, #0x0\n"
113 "4:" // Height 1: setup done
114 "mov x27, #0x0\n"
115 "5:" // Height 1: String loop
116 "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
117 "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
118 "ldr w26, [x20, x27, LSL #0x2]\n"
119 "tbz %x[flags], #3, 6f\n"
120 "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
121 "add x20, x20, x19, LSL #3\n"
122 "ldr x25, [x20, #0x0]\n"
123 "cbnz x27, 7f\n"
124 "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
125 "add x25, x25, x19\n"
126 "b 7f\n"
127 "6:" // Height 1: setup direct input
128 "mov x25, %x[input_ptr]\n"
129 "7:" // Height 1: input setup done
130 "cmp x26, #0x10\n"
131 "ble 9f\n"
132 "8:" // Height 1: Multiply loop: Main loop head
133 "ld1b { z6.b }, p5/Z, [x9]\n"
134 "whilelt p0.b, XZR, x26\n"
135 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
136 "sub x26, x26, #0x10\n"
137 "ld1rqb { z0.b }, p0/Z, [x25]\n"
138 "udot z8.s, z6.b, z0.b[0]\n"
139 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
140 "cmp x26, #0x10\n"
141 "udot z9.s, z7.b, z0.b[0]\n"
142 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
143 "add x25, x25, #0x10\n"
144 "udot z10.s, z6.b, z0.b[0]\n"
145 "ld1b { z6.b }, p5/Z, [x9, #4, MUL VL]\n"
146 "udot z11.s, z7.b, z0.b[0]\n"
147 "ld1b { z7.b }, p5/Z, [x9, #5, MUL VL]\n"
148 "udot z8.s, z6.b, z0.b[1]\n"
149 "ld1b { z6.b }, p5/Z, [x9, #6, MUL VL]\n"
150 "udot z9.s, z7.b, z0.b[1]\n"
151 "ld1b { z7.b }, p5/Z, [x9, #7, MUL VL]\n"
152 "addvl x9, x9, #16\n"
153 "udot z10.s, z6.b, z0.b[1]\n"
154 "ld1b { z6.b }, p5/Z, [x9, #-8, MUL VL]\n"
155 "udot z11.s, z7.b, z0.b[1]\n"
156 "ld1b { z7.b }, p5/Z, [x9, #-7, MUL VL]\n"
157 "udot z8.s, z6.b, z0.b[2]\n"
158 "ld1b { z6.b }, p5/Z, [x9, #-6, MUL VL]\n"
159 "udot z9.s, z7.b, z0.b[2]\n"
160 "ld1b { z7.b }, p5/Z, [x9, #-5, MUL VL]\n"
161 "udot z10.s, z6.b, z0.b[2]\n"
162 "ld1b { z6.b }, p5/Z, [x9, #-4, MUL VL]\n"
163 "udot z11.s, z7.b, z0.b[2]\n"
164 "ld1b { z7.b }, p5/Z, [x9, #-3, MUL VL]\n"
165 "udot z8.s, z6.b, z0.b[3]\n"
166 "ld1b { z6.b }, p5/Z, [x9, #-2, MUL VL]\n"
167 "udot z9.s, z7.b, z0.b[3]\n"
168 "ld1b { z7.b }, p5/Z, [x9, #-1, MUL VL]\n"
169 "udot z10.s, z6.b, z0.b[3]\n"
170 "udot z11.s, z7.b, z0.b[3]\n"
171 "bgt 8b\n"
172 "9:" // Height 1: Multiply loop: Single iteration only
173 "ld1b { z6.b }, p5/Z, [x9]\n"
174 "whilelt p0.b, XZR, x26\n"
175 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
176 "subs x26, x26, #0x4\n"
177 "ld1rqb { z0.b }, p0/Z, [x25]\n"
178 "udot z8.s, z6.b, z0.b[0]\n"
179 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
180 "udot z9.s, z7.b, z0.b[0]\n"
181 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
182 "addvl x9, x9, #4\n"
183 "udot z10.s, z6.b, z0.b[0]\n"
184 "udot z11.s, z7.b, z0.b[0]\n"
185 "ble 10f\n"
186 "ld1b { z6.b }, p5/Z, [x9]\n"
187 "udot z8.s, z6.b, z0.b[1]\n"
188 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
189 "subs x26, x26, #0x4\n"
190 "udot z9.s, z7.b, z0.b[1]\n"
191 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
192 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
193 "udot z10.s, z6.b, z0.b[1]\n"
194 "addvl x9, x9, #4\n"
195 "udot z11.s, z7.b, z0.b[1]\n"
196 "ble 10f\n"
197 "ld1b { z6.b }, p5/Z, [x9]\n"
198 "udot z8.s, z6.b, z0.b[2]\n"
199 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
200 "subs x26, x26, #0x4\n"
201 "udot z9.s, z7.b, z0.b[2]\n"
202 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
203 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
204 "udot z10.s, z6.b, z0.b[2]\n"
205 "addvl x9, x9, #4\n"
206 "udot z11.s, z7.b, z0.b[2]\n"
207 "ble 10f\n"
208 "ld1b { z6.b }, p5/Z, [x9]\n"
209 "udot z8.s, z6.b, z0.b[3]\n"
210 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
211 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
212 "udot z9.s, z7.b, z0.b[3]\n"
213 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
214 "addvl x9, x9, #4\n"
215 "udot z10.s, z6.b, z0.b[3]\n"
216 "udot z11.s, z7.b, z0.b[3]\n"
217 "10:" // Height 1: Multiply loop: multiply skip
218 "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
219 "add x27, x27, #0x1\n"
220 "cmp x27, x19\n"
221 "bne 5b\n"
222 "st1w { z8.s }, p4, [x28]\n"
223 "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
224 "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
225 "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
226 "addvl x28, x28, #4\n"
227 "11:" // Height 1: Writeback done
228 "decw x10, ALL, MUL #4\n"
229 "cmp x10, XZR\n"
230 "bgt 2b\n"
231 "b 68f\n"
232 "12:" // Height 2
233 "ldr x10, [%x[args_ptr], %[offsetof_N]]\n"
234 "mov x28, %x[output_ptr]\n"
235 "ldr x9, [%x[args_ptr], %[offsetof_B_ptr]]\n"
236 "13:" // Height 2: Column loop
237 "mov x19, #0x0\n"
238 "whilelt p4.s, x19, x10\n"
239 "incw x19\n"
240 "whilelt p3.s, x19, x10\n"
241 "incw x19\n"
242 "whilelt p2.s, x19, x10\n"
243 "incw x19\n"
244 "whilelt p1.s, x19, x10\n"
245 "tbz %x[flags], #0, 14f\n"
246 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
247 "ld1w { z8.s }, p4/Z, [x28]\n"
248 "add x23, x28, x19, LSL #2\n"
249 "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
250 "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
251 "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
252 "ld1w { z12.s }, p4/Z, [x23]\n"
253 "ld1w { z13.s }, p3/Z, [x23, #1, MUL VL]\n"
254 "ld1w { z14.s }, p2/Z, [x23, #2, MUL VL]\n"
255 "ld1w { z15.s }, p1/Z, [x23, #3, MUL VL]\n"
256 "b 15f\n"
257 "14:" // Height 2: no accumulate
258 "mov z8.s, #0x0\n"
259 "mov z9.s, #0x0\n"
260 "mov z10.s, #0x0\n"
261 "mov z11.s, #0x0\n"
262 "mov z12.s, #0x0\n"
263 "mov z13.s, #0x0\n"
264 "mov z14.s, #0x0\n"
265 "mov z15.s, #0x0\n"
266 "15:" // Height 2: setup done
267 "mov x27, #0x0\n"
268 "16:" // Height 2: String loop
269 "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
270 "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
271 "ldr w26, [x20, x27, LSL #0x2]\n"
272 "tbz %x[flags], #3, 17f\n"
273 "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
274 "add x20, x20, x19, LSL #3\n"
275 "ldr x25, [x20, #0x0]\n"
276 "ldr x24, [x20, #0x8]\n"
277 "cbnz x27, 18f\n"
278 "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
279 "add x25, x25, x19\n"
280 "add x24, x24, x19\n"
281 "b 18f\n"
282 "17:" // Height 2: setup direct input
283 "mov x25, %x[input_ptr]\n"
284 "add x24, x25, x19\n"
285 "18:" // Height 2: input setup done
286 "cmp x26, #0x10\n"
287 "ble 20f\n"
288 "19:" // Height 2: Multiply loop: Main loop head
289 "ld1b { z6.b }, p5/Z, [x9]\n"
290 "whilelt p0.b, XZR, x26\n"
291 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
292 "sub x26, x26, #0x10\n"
293 "ld1rqb { z0.b }, p0/Z, [x25]\n"
294 "udot z8.s, z6.b, z0.b[0]\n"
295 "ld1rqb { z1.b }, p0/Z, [x24]\n"
296 "cmp x26, #0x10\n"
297 "udot z9.s, z7.b, z0.b[0]\n"
298 "add x25, x25, #0x10\n"
299 "add x24, x24, #0x10\n"
300 "udot z12.s, z6.b, z1.b[0]\n"
301 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
302 "udot z13.s, z7.b, z1.b[0]\n"
303 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
304 "udot z10.s, z6.b, z0.b[0]\n"
305 "udot z14.s, z6.b, z1.b[0]\n"
306 "ld1b { z6.b }, p5/Z, [x9, #4, MUL VL]\n"
307 "udot z11.s, z7.b, z0.b[0]\n"
308 "udot z15.s, z7.b, z1.b[0]\n"
309 "ld1b { z7.b }, p5/Z, [x9, #5, MUL VL]\n"
310 "udot z8.s, z6.b, z0.b[1]\n"
311 "udot z12.s, z6.b, z1.b[1]\n"
312 "ld1b { z6.b }, p5/Z, [x9, #6, MUL VL]\n"
313 "udot z9.s, z7.b, z0.b[1]\n"
314 "udot z13.s, z7.b, z1.b[1]\n"
315 "ld1b { z7.b }, p5/Z, [x9, #7, MUL VL]\n"
316 "addvl x9, x9, #16\n"
317 "udot z10.s, z6.b, z0.b[1]\n"
318 "udot z14.s, z6.b, z1.b[1]\n"
319 "ld1b { z6.b }, p5/Z, [x9, #-8, MUL VL]\n"
320 "udot z11.s, z7.b, z0.b[1]\n"
321 "udot z15.s, z7.b, z1.b[1]\n"
322 "ld1b { z7.b }, p5/Z, [x9, #-7, MUL VL]\n"
323 "udot z8.s, z6.b, z0.b[2]\n"
324 "udot z12.s, z6.b, z1.b[2]\n"
325 "ld1b { z6.b }, p5/Z, [x9, #-6, MUL VL]\n"
326 "udot z9.s, z7.b, z0.b[2]\n"
327 "udot z13.s, z7.b, z1.b[2]\n"
328 "ld1b { z7.b }, p5/Z, [x9, #-5, MUL VL]\n"
329 "udot z10.s, z6.b, z0.b[2]\n"
330 "udot z14.s, z6.b, z1.b[2]\n"
331 "ld1b { z6.b }, p5/Z, [x9, #-4, MUL VL]\n"
332 "udot z11.s, z7.b, z0.b[2]\n"
333 "udot z15.s, z7.b, z1.b[2]\n"
334 "ld1b { z7.b }, p5/Z, [x9, #-3, MUL VL]\n"
335 "udot z8.s, z6.b, z0.b[3]\n"
336 "udot z12.s, z6.b, z1.b[3]\n"
337 "ld1b { z6.b }, p5/Z, [x9, #-2, MUL VL]\n"
338 "udot z9.s, z7.b, z0.b[3]\n"
339 "udot z13.s, z7.b, z1.b[3]\n"
340 "ld1b { z7.b }, p5/Z, [x9, #-1, MUL VL]\n"
341 "udot z10.s, z6.b, z0.b[3]\n"
342 "udot z14.s, z6.b, z1.b[3]\n"
343 "udot z11.s, z7.b, z0.b[3]\n"
344 "udot z15.s, z7.b, z1.b[3]\n"
345 "bgt 19b\n"
346 "20:" // Height 2: Multiply loop: Single iteration only
347 "ld1b { z6.b }, p5/Z, [x9]\n"
348 "whilelt p0.b, XZR, x26\n"
349 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
350 "subs x26, x26, #0x4\n"
351 "ld1rqb { z0.b }, p0/Z, [x25]\n"
352 "udot z8.s, z6.b, z0.b[0]\n"
353 "ld1rqb { z1.b }, p0/Z, [x24]\n"
354 "udot z9.s, z7.b, z0.b[0]\n"
355 "udot z12.s, z6.b, z1.b[0]\n"
356 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
357 "udot z13.s, z7.b, z1.b[0]\n"
358 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
359 "addvl x9, x9, #4\n"
360 "udot z10.s, z6.b, z0.b[0]\n"
361 "udot z14.s, z6.b, z1.b[0]\n"
362 "udot z11.s, z7.b, z0.b[0]\n"
363 "udot z15.s, z7.b, z1.b[0]\n"
364 "ble 21f\n"
365 "ld1b { z6.b }, p5/Z, [x9]\n"
366 "udot z8.s, z6.b, z0.b[1]\n"
367 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
368 "subs x26, x26, #0x4\n"
369 "udot z12.s, z6.b, z1.b[1]\n"
370 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
371 "udot z9.s, z7.b, z0.b[1]\n"
372 "udot z13.s, z7.b, z1.b[1]\n"
373 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
374 "addvl x9, x9, #4\n"
375 "udot z10.s, z6.b, z0.b[1]\n"
376 "udot z14.s, z6.b, z1.b[1]\n"
377 "udot z11.s, z7.b, z0.b[1]\n"
378 "udot z15.s, z7.b, z1.b[1]\n"
379 "ble 21f\n"
380 "ld1b { z6.b }, p5/Z, [x9]\n"
381 "udot z8.s, z6.b, z0.b[2]\n"
382 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
383 "subs x26, x26, #0x4\n"
384 "udot z12.s, z6.b, z1.b[2]\n"
385 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
386 "udot z9.s, z7.b, z0.b[2]\n"
387 "udot z13.s, z7.b, z1.b[2]\n"
388 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
389 "addvl x9, x9, #4\n"
390 "udot z10.s, z6.b, z0.b[2]\n"
391 "udot z14.s, z6.b, z1.b[2]\n"
392 "udot z11.s, z7.b, z0.b[2]\n"
393 "udot z15.s, z7.b, z1.b[2]\n"
394 "ble 21f\n"
395 "ld1b { z6.b }, p5/Z, [x9]\n"
396 "udot z8.s, z6.b, z0.b[3]\n"
397 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
398 "udot z12.s, z6.b, z1.b[3]\n"
399 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
400 "udot z9.s, z7.b, z0.b[3]\n"
401 "udot z13.s, z7.b, z1.b[3]\n"
402 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
403 "addvl x9, x9, #4\n"
404 "udot z10.s, z6.b, z0.b[3]\n"
405 "udot z14.s, z6.b, z1.b[3]\n"
406 "udot z11.s, z7.b, z0.b[3]\n"
407 "udot z15.s, z7.b, z1.b[3]\n"
408 "21:" // Height 2: Multiply loop: multiply skip
409 "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
410 "add x27, x27, #0x1\n"
411 "cmp x27, x19\n"
412 "bne 16b\n"
413 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
414 "st1w { z8.s }, p4, [x28]\n"
415 "add x23, x28, x19, LSL #2\n"
416 "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
417 "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
418 "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
419 "addvl x28, x28, #4\n"
420 "st1w { z12.s }, p4, [x23]\n"
421 "st1w { z13.s }, p3, [x23, #1, MUL VL]\n"
422 "st1w { z14.s }, p2, [x23, #2, MUL VL]\n"
423 "st1w { z15.s }, p1, [x23, #3, MUL VL]\n"
424 "22:" // Height 2: Writeback done
425 "decw x10, ALL, MUL #4\n"
426 "cmp x10, XZR\n"
427 "bgt 13b\n"
428 "b 68f\n"
429 "23:" // Height 3
430 "ldr x10, [%x[args_ptr], %[offsetof_N]]\n"
431 "mov x28, %x[output_ptr]\n"
432 "ldr x9, [%x[args_ptr], %[offsetof_B_ptr]]\n"
433 "24:" // Height 3: Column loop
434 "mov x19, #0x0\n"
435 "whilelt p4.s, x19, x10\n"
436 "incw x19\n"
437 "whilelt p3.s, x19, x10\n"
438 "incw x19\n"
439 "whilelt p2.s, x19, x10\n"
440 "incw x19\n"
441 "whilelt p1.s, x19, x10\n"
442 "tbz %x[flags], #0, 25f\n"
443 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
444 "ld1w { z8.s }, p4/Z, [x28]\n"
445 "add x23, x28, x19, LSL #2\n"
446 "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
447 "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
448 "add x22, x23, x19, LSL #2\n"
449 "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
450 "ld1w { z12.s }, p4/Z, [x23]\n"
451 "ld1w { z13.s }, p3/Z, [x23, #1, MUL VL]\n"
452 "ld1w { z14.s }, p2/Z, [x23, #2, MUL VL]\n"
453 "ld1w { z15.s }, p1/Z, [x23, #3, MUL VL]\n"
454 "ld1w { z16.s }, p4/Z, [x22]\n"
455 "ld1w { z17.s }, p3/Z, [x22, #1, MUL VL]\n"
456 "ld1w { z18.s }, p2/Z, [x22, #2, MUL VL]\n"
457 "ld1w { z19.s }, p1/Z, [x22, #3, MUL VL]\n"
458 "b 26f\n"
459 "25:" // Height 3: no accumulate
460 "mov z8.s, #0x0\n"
461 "mov z9.s, #0x0\n"
462 "mov z10.s, #0x0\n"
463 "mov z11.s, #0x0\n"
464 "mov z12.s, #0x0\n"
465 "mov z13.s, #0x0\n"
466 "mov z14.s, #0x0\n"
467 "mov z15.s, #0x0\n"
468 "mov z16.s, #0x0\n"
469 "mov z17.s, #0x0\n"
470 "mov z18.s, #0x0\n"
471 "mov z19.s, #0x0\n"
472 "26:" // Height 3: setup done
473 "mov x27, #0x0\n"
474 "27:" // Height 3: String loop
475 "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
476 "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
477 "ldr w26, [x20, x27, LSL #0x2]\n"
478 "tbz %x[flags], #3, 28f\n"
479 "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
480 "add x20, x20, x19, LSL #3\n"
481 "ldr x25, [x20, #0x0]\n"
482 "ldr x24, [x20, #0x8]\n"
483 "ldr x23, [x20, #0x10]\n"
484 "cbnz x27, 29f\n"
485 "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
486 "add x25, x25, x19\n"
487 "add x24, x24, x19\n"
488 "add x23, x23, x19\n"
489 "b 29f\n"
490 "28:" // Height 3: setup direct input
491 "mov x25, %x[input_ptr]\n"
492 "add x24, x25, x19\n"
493 "add x23, x24, x19\n"
494 "29:" // Height 3: input setup done
495 "cmp x26, #0x10\n"
496 "ble 31f\n"
497 "30:" // Height 3: Multiply loop: Main loop head
498 "ld1b { z6.b }, p5/Z, [x9]\n"
499 "whilelt p0.b, XZR, x26\n"
500 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
501 "sub x26, x26, #0x10\n"
502 "ld1rqb { z0.b }, p0/Z, [x25]\n"
503 "udot z8.s, z6.b, z0.b[0]\n"
504 "ld1rqb { z1.b }, p0/Z, [x24]\n"
505 "cmp x26, #0x10\n"
506 "udot z9.s, z7.b, z0.b[0]\n"
507 "ld1rqb { z2.b }, p0/Z, [x23]\n"
508 "add x25, x25, #0x10\n"
509 "udot z12.s, z6.b, z1.b[0]\n"
510 "add x24, x24, #0x10\n"
511 "udot z13.s, z7.b, z1.b[0]\n"
512 "add x23, x23, #0x10\n"
513 "udot z16.s, z6.b, z2.b[0]\n"
514 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
515 "udot z17.s, z7.b, z2.b[0]\n"
516 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
517 "udot z10.s, z6.b, z0.b[0]\n"
518 "udot z14.s, z6.b, z1.b[0]\n"
519 "udot z18.s, z6.b, z2.b[0]\n"
520 "ld1b { z6.b }, p5/Z, [x9, #4, MUL VL]\n"
521 "udot z11.s, z7.b, z0.b[0]\n"
522 "udot z15.s, z7.b, z1.b[0]\n"
523 "udot z19.s, z7.b, z2.b[0]\n"
524 "ld1b { z7.b }, p5/Z, [x9, #5, MUL VL]\n"
525 "udot z8.s, z6.b, z0.b[1]\n"
526 "udot z12.s, z6.b, z1.b[1]\n"
527 "udot z16.s, z6.b, z2.b[1]\n"
528 "ld1b { z6.b }, p5/Z, [x9, #6, MUL VL]\n"
529 "udot z9.s, z7.b, z0.b[1]\n"
530 "udot z13.s, z7.b, z1.b[1]\n"
531 "udot z17.s, z7.b, z2.b[1]\n"
532 "ld1b { z7.b }, p5/Z, [x9, #7, MUL VL]\n"
533 "addvl x9, x9, #16\n"
534 "udot z10.s, z6.b, z0.b[1]\n"
535 "udot z14.s, z6.b, z1.b[1]\n"
536 "udot z18.s, z6.b, z2.b[1]\n"
537 "ld1b { z6.b }, p5/Z, [x9, #-8, MUL VL]\n"
538 "udot z11.s, z7.b, z0.b[1]\n"
539 "udot z15.s, z7.b, z1.b[1]\n"
540 "udot z19.s, z7.b, z2.b[1]\n"
541 "ld1b { z7.b }, p5/Z, [x9, #-7, MUL VL]\n"
542 "udot z8.s, z6.b, z0.b[2]\n"
543 "udot z12.s, z6.b, z1.b[2]\n"
544 "udot z16.s, z6.b, z2.b[2]\n"
545 "ld1b { z6.b }, p5/Z, [x9, #-6, MUL VL]\n"
546 "udot z9.s, z7.b, z0.b[2]\n"
547 "udot z13.s, z7.b, z1.b[2]\n"
548 "udot z17.s, z7.b, z2.b[2]\n"
549 "ld1b { z7.b }, p5/Z, [x9, #-5, MUL VL]\n"
550 "udot z10.s, z6.b, z0.b[2]\n"
551 "udot z14.s, z6.b, z1.b[2]\n"
552 "udot z18.s, z6.b, z2.b[2]\n"
553 "ld1b { z6.b }, p5/Z, [x9, #-4, MUL VL]\n"
554 "udot z11.s, z7.b, z0.b[2]\n"
555 "udot z15.s, z7.b, z1.b[2]\n"
556 "udot z19.s, z7.b, z2.b[2]\n"
557 "ld1b { z7.b }, p5/Z, [x9, #-3, MUL VL]\n"
558 "udot z8.s, z6.b, z0.b[3]\n"
559 "udot z12.s, z6.b, z1.b[3]\n"
560 "udot z16.s, z6.b, z2.b[3]\n"
561 "ld1b { z6.b }, p5/Z, [x9, #-2, MUL VL]\n"
562 "udot z9.s, z7.b, z0.b[3]\n"
563 "udot z13.s, z7.b, z1.b[3]\n"
564 "udot z17.s, z7.b, z2.b[3]\n"
565 "ld1b { z7.b }, p5/Z, [x9, #-1, MUL VL]\n"
566 "udot z10.s, z6.b, z0.b[3]\n"
567 "udot z14.s, z6.b, z1.b[3]\n"
568 "udot z18.s, z6.b, z2.b[3]\n"
569 "udot z11.s, z7.b, z0.b[3]\n"
570 "udot z15.s, z7.b, z1.b[3]\n"
571 "udot z19.s, z7.b, z2.b[3]\n"
572 "bgt 30b\n"
573 "31:" // Height 3: Multiply loop: Single iteration only
574 "ld1b { z6.b }, p5/Z, [x9]\n"
575 "whilelt p0.b, XZR, x26\n"
576 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
577 "subs x26, x26, #0x4\n"
578 "ld1rqb { z0.b }, p0/Z, [x25]\n"
579 "udot z8.s, z6.b, z0.b[0]\n"
580 "ld1rqb { z1.b }, p0/Z, [x24]\n"
581 "udot z9.s, z7.b, z0.b[0]\n"
582 "ld1rqb { z2.b }, p0/Z, [x23]\n"
583 "udot z12.s, z6.b, z1.b[0]\n"
584 "udot z13.s, z7.b, z1.b[0]\n"
585 "udot z16.s, z6.b, z2.b[0]\n"
586 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
587 "udot z17.s, z7.b, z2.b[0]\n"
588 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
589 "addvl x9, x9, #4\n"
590 "udot z10.s, z6.b, z0.b[0]\n"
591 "udot z14.s, z6.b, z1.b[0]\n"
592 "udot z18.s, z6.b, z2.b[0]\n"
593 "udot z11.s, z7.b, z0.b[0]\n"
594 "udot z15.s, z7.b, z1.b[0]\n"
595 "udot z19.s, z7.b, z2.b[0]\n"
596 "ble 32f\n"
597 "ld1b { z6.b }, p5/Z, [x9]\n"
598 "udot z8.s, z6.b, z0.b[1]\n"
599 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
600 "subs x26, x26, #0x4\n"
601 "udot z12.s, z6.b, z1.b[1]\n"
602 "udot z16.s, z6.b, z2.b[1]\n"
603 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
604 "udot z9.s, z7.b, z0.b[1]\n"
605 "udot z13.s, z7.b, z1.b[1]\n"
606 "udot z17.s, z7.b, z2.b[1]\n"
607 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
608 "addvl x9, x9, #4\n"
609 "udot z10.s, z6.b, z0.b[1]\n"
610 "udot z14.s, z6.b, z1.b[1]\n"
611 "udot z18.s, z6.b, z2.b[1]\n"
612 "udot z11.s, z7.b, z0.b[1]\n"
613 "udot z15.s, z7.b, z1.b[1]\n"
614 "udot z19.s, z7.b, z2.b[1]\n"
615 "ble 32f\n"
616 "ld1b { z6.b }, p5/Z, [x9]\n"
617 "udot z8.s, z6.b, z0.b[2]\n"
618 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
619 "subs x26, x26, #0x4\n"
620 "udot z12.s, z6.b, z1.b[2]\n"
621 "udot z16.s, z6.b, z2.b[2]\n"
622 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
623 "udot z9.s, z7.b, z0.b[2]\n"
624 "udot z13.s, z7.b, z1.b[2]\n"
625 "udot z17.s, z7.b, z2.b[2]\n"
626 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
627 "addvl x9, x9, #4\n"
628 "udot z10.s, z6.b, z0.b[2]\n"
629 "udot z14.s, z6.b, z1.b[2]\n"
630 "udot z18.s, z6.b, z2.b[2]\n"
631 "udot z11.s, z7.b, z0.b[2]\n"
632 "udot z15.s, z7.b, z1.b[2]\n"
633 "udot z19.s, z7.b, z2.b[2]\n"
634 "ble 32f\n"
635 "ld1b { z6.b }, p5/Z, [x9]\n"
636 "udot z8.s, z6.b, z0.b[3]\n"
637 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
638 "udot z12.s, z6.b, z1.b[3]\n"
639 "udot z16.s, z6.b, z2.b[3]\n"
640 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
641 "udot z9.s, z7.b, z0.b[3]\n"
642 "udot z13.s, z7.b, z1.b[3]\n"
643 "udot z17.s, z7.b, z2.b[3]\n"
644 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
645 "addvl x9, x9, #4\n"
646 "udot z10.s, z6.b, z0.b[3]\n"
647 "udot z14.s, z6.b, z1.b[3]\n"
648 "udot z18.s, z6.b, z2.b[3]\n"
649 "udot z11.s, z7.b, z0.b[3]\n"
650 "udot z15.s, z7.b, z1.b[3]\n"
651 "udot z19.s, z7.b, z2.b[3]\n"
652 "32:" // Height 3: Multiply loop: multiply skip
653 "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
654 "add x27, x27, #0x1\n"
655 "cmp x27, x19\n"
656 "bne 27b\n"
657 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
658 "st1w { z8.s }, p4, [x28]\n"
659 "add x23, x28, x19, LSL #2\n"
660 "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
661 "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
662 "add x22, x23, x19, LSL #2\n"
663 "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
664 "addvl x28, x28, #4\n"
665 "st1w { z12.s }, p4, [x23]\n"
666 "st1w { z13.s }, p3, [x23, #1, MUL VL]\n"
667 "st1w { z14.s }, p2, [x23, #2, MUL VL]\n"
668 "st1w { z15.s }, p1, [x23, #3, MUL VL]\n"
669 "st1w { z16.s }, p4, [x22]\n"
670 "st1w { z17.s }, p3, [x22, #1, MUL VL]\n"
671 "st1w { z18.s }, p2, [x22, #2, MUL VL]\n"
672 "st1w { z19.s }, p1, [x22, #3, MUL VL]\n"
673 "33:" // Height 3: Writeback done
674 "decw x10, ALL, MUL #4\n"
675 "cmp x10, XZR\n"
676 "bgt 24b\n"
677 "b 68f\n"
678 "34:" // Height 4
679 "ldr x10, [%x[args_ptr], %[offsetof_N]]\n"
680 "mov x28, %x[output_ptr]\n"
681 "ldr x9, [%x[args_ptr], %[offsetof_B_ptr]]\n"
682 "35:" // Height 4: Column loop
683 "mov x19, #0x0\n"
684 "whilelt p4.s, x19, x10\n"
685 "incw x19\n"
686 "whilelt p3.s, x19, x10\n"
687 "incw x19\n"
688 "whilelt p2.s, x19, x10\n"
689 "incw x19\n"
690 "whilelt p1.s, x19, x10\n"
691 "tbz %x[flags], #0, 36f\n"
692 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
693 "ld1w { z8.s }, p4/Z, [x28]\n"
694 "add x23, x28, x19, LSL #2\n"
695 "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
696 "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
697 "add x22, x23, x19, LSL #2\n"
698 "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
699 "add x21, x22, x19, LSL #2\n"
700 "ld1w { z12.s }, p4/Z, [x23]\n"
701 "ld1w { z13.s }, p3/Z, [x23, #1, MUL VL]\n"
702 "ld1w { z14.s }, p2/Z, [x23, #2, MUL VL]\n"
703 "ld1w { z15.s }, p1/Z, [x23, #3, MUL VL]\n"
704 "ld1w { z16.s }, p4/Z, [x22]\n"
705 "ld1w { z17.s }, p3/Z, [x22, #1, MUL VL]\n"
706 "ld1w { z18.s }, p2/Z, [x22, #2, MUL VL]\n"
707 "ld1w { z19.s }, p1/Z, [x22, #3, MUL VL]\n"
708 "ld1w { z20.s }, p4/Z, [x21]\n"
709 "ld1w { z21.s }, p3/Z, [x21, #1, MUL VL]\n"
710 "ld1w { z22.s }, p2/Z, [x21, #2, MUL VL]\n"
711 "ld1w { z23.s }, p1/Z, [x21, #3, MUL VL]\n"
712 "b 37f\n"
713 "36:" // Height 4: no accumulate
714 "mov z8.s, #0x0\n"
715 "mov z9.s, #0x0\n"
716 "mov z10.s, #0x0\n"
717 "mov z11.s, #0x0\n"
718 "mov z12.s, #0x0\n"
719 "mov z13.s, #0x0\n"
720 "mov z14.s, #0x0\n"
721 "mov z15.s, #0x0\n"
722 "mov z16.s, #0x0\n"
723 "mov z17.s, #0x0\n"
724 "mov z18.s, #0x0\n"
725 "mov z19.s, #0x0\n"
726 "mov z20.s, #0x0\n"
727 "mov z21.s, #0x0\n"
728 "mov z22.s, #0x0\n"
729 "mov z23.s, #0x0\n"
730 "37:" // Height 4: setup done
731 "mov x27, #0x0\n"
732 "38:" // Height 4: String loop
733 "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
734 "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
735 "ldr w26, [x20, x27, LSL #0x2]\n"
736 "tbz %x[flags], #3, 39f\n"
737 "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
738 "add x20, x20, x19, LSL #3\n"
739 "ldr x25, [x20, #0x0]\n"
740 "ldr x24, [x20, #0x8]\n"
741 "ldr x23, [x20, #0x10]\n"
742 "ldr x22, [x20, #0x18]\n"
743 "cbnz x27, 40f\n"
744 "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
745 "add x25, x25, x19\n"
746 "add x24, x24, x19\n"
747 "add x23, x23, x19\n"
748 "add x22, x22, x19\n"
749 "b 40f\n"
750 "39:" // Height 4: setup direct input
751 "mov x25, %x[input_ptr]\n"
752 "add x24, x25, x19\n"
753 "add x23, x24, x19\n"
754 "add x22, x23, x19\n"
755 "40:" // Height 4: input setup done
756 "cmp x26, #0x10\n"
757 "ble 42f\n"
758 "41:" // Height 4: Multiply loop: Main loop head
759 "ld1b { z6.b }, p5/Z, [x9]\n"
760 "whilelt p0.b, XZR, x26\n"
761 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
762 "sub x26, x26, #0x10\n"
763 "ld1rqb { z0.b }, p0/Z, [x25]\n"
764 "udot z8.s, z6.b, z0.b[0]\n"
765 "ld1rqb { z1.b }, p0/Z, [x24]\n"
766 "cmp x26, #0x10\n"
767 "udot z9.s, z7.b, z0.b[0]\n"
768 "ld1rqb { z2.b }, p0/Z, [x23]\n"
769 "add x25, x25, #0x10\n"
770 "udot z12.s, z6.b, z1.b[0]\n"
771 "ld1rqb { z3.b }, p0/Z, [x22]\n"
772 "add x24, x24, #0x10\n"
773 "udot z16.s, z6.b, z2.b[0]\n"
774 "add x23, x23, #0x10\n"
775 "udot z13.s, z7.b, z1.b[0]\n"
776 "add x22, x22, #0x10\n"
777 "udot z17.s, z7.b, z2.b[0]\n"
778 "udot z20.s, z6.b, z3.b[0]\n"
779 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
780 "udot z21.s, z7.b, z3.b[0]\n"
781 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
782 "udot z10.s, z6.b, z0.b[0]\n"
783 "udot z14.s, z6.b, z1.b[0]\n"
784 "udot z18.s, z6.b, z2.b[0]\n"
785 "udot z22.s, z6.b, z3.b[0]\n"
786 "ld1b { z6.b }, p5/Z, [x9, #4, MUL VL]\n"
787 "udot z11.s, z7.b, z0.b[0]\n"
788 "udot z15.s, z7.b, z1.b[0]\n"
789 "udot z19.s, z7.b, z2.b[0]\n"
790 "udot z23.s, z7.b, z3.b[0]\n"
791 "ld1b { z7.b }, p5/Z, [x9, #5, MUL VL]\n"
792 "udot z8.s, z6.b, z0.b[1]\n"
793 "udot z12.s, z6.b, z1.b[1]\n"
794 "udot z16.s, z6.b, z2.b[1]\n"
795 "udot z20.s, z6.b, z3.b[1]\n"
796 "ld1b { z6.b }, p5/Z, [x9, #6, MUL VL]\n"
797 "udot z9.s, z7.b, z0.b[1]\n"
798 "udot z13.s, z7.b, z1.b[1]\n"
799 "udot z17.s, z7.b, z2.b[1]\n"
800 "udot z21.s, z7.b, z3.b[1]\n"
801 "ld1b { z7.b }, p5/Z, [x9, #7, MUL VL]\n"
802 "addvl x9, x9, #16\n"
803 "udot z10.s, z6.b, z0.b[1]\n"
804 "udot z14.s, z6.b, z1.b[1]\n"
805 "udot z18.s, z6.b, z2.b[1]\n"
806 "udot z22.s, z6.b, z3.b[1]\n"
807 "ld1b { z6.b }, p5/Z, [x9, #-8, MUL VL]\n"
808 "udot z11.s, z7.b, z0.b[1]\n"
809 "udot z15.s, z7.b, z1.b[1]\n"
810 "udot z19.s, z7.b, z2.b[1]\n"
811 "udot z23.s, z7.b, z3.b[1]\n"
812 "ld1b { z7.b }, p5/Z, [x9, #-7, MUL VL]\n"
813 "udot z8.s, z6.b, z0.b[2]\n"
814 "udot z12.s, z6.b, z1.b[2]\n"
815 "udot z16.s, z6.b, z2.b[2]\n"
816 "udot z20.s, z6.b, z3.b[2]\n"
817 "ld1b { z6.b }, p5/Z, [x9, #-6, MUL VL]\n"
818 "udot z9.s, z7.b, z0.b[2]\n"
819 "udot z13.s, z7.b, z1.b[2]\n"
820 "udot z17.s, z7.b, z2.b[2]\n"
821 "udot z21.s, z7.b, z3.b[2]\n"
822 "ld1b { z7.b }, p5/Z, [x9, #-5, MUL VL]\n"
823 "udot z10.s, z6.b, z0.b[2]\n"
824 "udot z14.s, z6.b, z1.b[2]\n"
825 "udot z18.s, z6.b, z2.b[2]\n"
826 "udot z22.s, z6.b, z3.b[2]\n"
827 "ld1b { z6.b }, p5/Z, [x9, #-4, MUL VL]\n"
828 "udot z11.s, z7.b, z0.b[2]\n"
829 "udot z15.s, z7.b, z1.b[2]\n"
830 "udot z19.s, z7.b, z2.b[2]\n"
831 "udot z23.s, z7.b, z3.b[2]\n"
832 "ld1b { z7.b }, p5/Z, [x9, #-3, MUL VL]\n"
833 "udot z8.s, z6.b, z0.b[3]\n"
834 "udot z12.s, z6.b, z1.b[3]\n"
835 "udot z16.s, z6.b, z2.b[3]\n"
836 "udot z20.s, z6.b, z3.b[3]\n"
837 "ld1b { z6.b }, p5/Z, [x9, #-2, MUL VL]\n"
838 "udot z9.s, z7.b, z0.b[3]\n"
839 "udot z13.s, z7.b, z1.b[3]\n"
840 "udot z17.s, z7.b, z2.b[3]\n"
841 "udot z21.s, z7.b, z3.b[3]\n"
842 "ld1b { z7.b }, p5/Z, [x9, #-1, MUL VL]\n"
843 "udot z10.s, z6.b, z0.b[3]\n"
844 "udot z14.s, z6.b, z1.b[3]\n"
845 "udot z18.s, z6.b, z2.b[3]\n"
846 "udot z22.s, z6.b, z3.b[3]\n"
847 "udot z11.s, z7.b, z0.b[3]\n"
848 "udot z15.s, z7.b, z1.b[3]\n"
849 "udot z19.s, z7.b, z2.b[3]\n"
850 "udot z23.s, z7.b, z3.b[3]\n"
851 "bgt 41b\n"
852 "42:" // Height 4: Multiply loop: Single iteration only
853 "ld1b { z6.b }, p5/Z, [x9]\n"
854 "whilelt p0.b, XZR, x26\n"
855 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
856 "subs x26, x26, #0x4\n"
857 "ld1rqb { z0.b }, p0/Z, [x25]\n"
858 "udot z8.s, z6.b, z0.b[0]\n"
859 "ld1rqb { z1.b }, p0/Z, [x24]\n"
860 "udot z9.s, z7.b, z0.b[0]\n"
861 "ld1rqb { z2.b }, p0/Z, [x23]\n"
862 "ld1rqb { z3.b }, p0/Z, [x22]\n"
863 "udot z12.s, z6.b, z1.b[0]\n"
864 "udot z13.s, z7.b, z1.b[0]\n"
865 "udot z16.s, z6.b, z2.b[0]\n"
866 "udot z20.s, z6.b, z3.b[0]\n"
867 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
868 "udot z17.s, z7.b, z2.b[0]\n"
869 "udot z21.s, z7.b, z3.b[0]\n"
870 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
871 "addvl x9, x9, #4\n"
872 "udot z10.s, z6.b, z0.b[0]\n"
873 "udot z14.s, z6.b, z1.b[0]\n"
874 "udot z18.s, z6.b, z2.b[0]\n"
875 "udot z22.s, z6.b, z3.b[0]\n"
876 "udot z11.s, z7.b, z0.b[0]\n"
877 "udot z15.s, z7.b, z1.b[0]\n"
878 "udot z19.s, z7.b, z2.b[0]\n"
879 "udot z23.s, z7.b, z3.b[0]\n"
880 "ble 43f\n"
881 "ld1b { z6.b }, p5/Z, [x9]\n"
882 "udot z8.s, z6.b, z0.b[1]\n"
883 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
884 "subs x26, x26, #0x4\n"
885 "udot z12.s, z6.b, z1.b[1]\n"
886 "udot z16.s, z6.b, z2.b[1]\n"
887 "udot z20.s, z6.b, z3.b[1]\n"
888 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
889 "udot z9.s, z7.b, z0.b[1]\n"
890 "udot z13.s, z7.b, z1.b[1]\n"
891 "udot z17.s, z7.b, z2.b[1]\n"
892 "udot z21.s, z7.b, z3.b[1]\n"
893 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
894 "addvl x9, x9, #4\n"
895 "udot z10.s, z6.b, z0.b[1]\n"
896 "udot z14.s, z6.b, z1.b[1]\n"
897 "udot z18.s, z6.b, z2.b[1]\n"
898 "udot z22.s, z6.b, z3.b[1]\n"
899 "udot z11.s, z7.b, z0.b[1]\n"
900 "udot z15.s, z7.b, z1.b[1]\n"
901 "udot z19.s, z7.b, z2.b[1]\n"
902 "udot z23.s, z7.b, z3.b[1]\n"
903 "ble 43f\n"
904 "ld1b { z6.b }, p5/Z, [x9]\n"
905 "udot z8.s, z6.b, z0.b[2]\n"
906 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
907 "subs x26, x26, #0x4\n"
908 "udot z12.s, z6.b, z1.b[2]\n"
909 "udot z16.s, z6.b, z2.b[2]\n"
910 "udot z20.s, z6.b, z3.b[2]\n"
911 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
912 "udot z9.s, z7.b, z0.b[2]\n"
913 "udot z13.s, z7.b, z1.b[2]\n"
914 "udot z17.s, z7.b, z2.b[2]\n"
915 "udot z21.s, z7.b, z3.b[2]\n"
916 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
917 "addvl x9, x9, #4\n"
918 "udot z10.s, z6.b, z0.b[2]\n"
919 "udot z14.s, z6.b, z1.b[2]\n"
920 "udot z18.s, z6.b, z2.b[2]\n"
921 "udot z22.s, z6.b, z3.b[2]\n"
922 "udot z11.s, z7.b, z0.b[2]\n"
923 "udot z15.s, z7.b, z1.b[2]\n"
924 "udot z19.s, z7.b, z2.b[2]\n"
925 "udot z23.s, z7.b, z3.b[2]\n"
926 "ble 43f\n"
927 "ld1b { z6.b }, p5/Z, [x9]\n"
928 "udot z8.s, z6.b, z0.b[3]\n"
929 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
930 "udot z12.s, z6.b, z1.b[3]\n"
931 "udot z16.s, z6.b, z2.b[3]\n"
932 "udot z20.s, z6.b, z3.b[3]\n"
933 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
934 "udot z9.s, z7.b, z0.b[3]\n"
935 "udot z13.s, z7.b, z1.b[3]\n"
936 "udot z17.s, z7.b, z2.b[3]\n"
937 "udot z21.s, z7.b, z3.b[3]\n"
938 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
939 "addvl x9, x9, #4\n"
940 "udot z10.s, z6.b, z0.b[3]\n"
941 "udot z14.s, z6.b, z1.b[3]\n"
942 "udot z18.s, z6.b, z2.b[3]\n"
943 "udot z22.s, z6.b, z3.b[3]\n"
944 "udot z11.s, z7.b, z0.b[3]\n"
945 "udot z15.s, z7.b, z1.b[3]\n"
946 "udot z19.s, z7.b, z2.b[3]\n"
947 "udot z23.s, z7.b, z3.b[3]\n"
948 "43:" // Height 4: Multiply loop: multiply skip
949 "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
950 "add x27, x27, #0x1\n"
951 "cmp x27, x19\n"
952 "bne 38b\n"
953 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
954 "st1w { z8.s }, p4, [x28]\n"
955 "add x23, x28, x19, LSL #2\n"
956 "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
957 "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
958 "add x22, x23, x19, LSL #2\n"
959 "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
960 "add x21, x22, x19, LSL #2\n"
961 "st1w { z12.s }, p4, [x23]\n"
962 "addvl x28, x28, #4\n"
963 "st1w { z13.s }, p3, [x23, #1, MUL VL]\n"
964 "st1w { z14.s }, p2, [x23, #2, MUL VL]\n"
965 "st1w { z15.s }, p1, [x23, #3, MUL VL]\n"
966 "st1w { z16.s }, p4, [x22]\n"
967 "st1w { z17.s }, p3, [x22, #1, MUL VL]\n"
968 "st1w { z18.s }, p2, [x22, #2, MUL VL]\n"
969 "st1w { z19.s }, p1, [x22, #3, MUL VL]\n"
970 "st1w { z20.s }, p4, [x21]\n"
971 "st1w { z21.s }, p3, [x21, #1, MUL VL]\n"
972 "st1w { z22.s }, p2, [x21, #2, MUL VL]\n"
973 "st1w { z23.s }, p1, [x21, #3, MUL VL]\n"
974 "44:" // Height 4: Writeback done
975 "decw x10, ALL, MUL #4\n"
976 "cmp x10, XZR\n"
977 "bgt 35b\n"
978 "b 68f\n"
979 "45:" // Height 5
980 "ldr x10, [%x[args_ptr], %[offsetof_N]]\n"
981 "mov x28, %x[output_ptr]\n"
982 "ldr x9, [%x[args_ptr], %[offsetof_B_ptr]]\n"
983 "46:" // Height 5: Column loop
984 "mov x19, #0x0\n"
985 "whilelt p4.s, x19, x10\n"
986 "incw x19\n"
987 "whilelt p3.s, x19, x10\n"
988 "incw x19\n"
989 "whilelt p2.s, x19, x10\n"
990 "incw x19\n"
991 "whilelt p1.s, x19, x10\n"
992 "tbz %x[flags], #0, 47f\n"
993 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
994 "ld1w { z8.s }, p4/Z, [x28]\n"
995 "add x23, x28, x19, LSL #2\n"
996 "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
997 "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
998 "add x22, x23, x19, LSL #2\n"
999 "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
1000 "add x21, x22, x19, LSL #2\n"
1001 "ld1w { z12.s }, p4/Z, [x23]\n"
1002 "add x20, x21, x19, LSL #2\n"
1003 "ld1w { z13.s }, p3/Z, [x23, #1, MUL VL]\n"
1004 "ld1w { z14.s }, p2/Z, [x23, #2, MUL VL]\n"
1005 "ld1w { z15.s }, p1/Z, [x23, #3, MUL VL]\n"
1006 "ld1w { z16.s }, p4/Z, [x22]\n"
1007 "ld1w { z17.s }, p3/Z, [x22, #1, MUL VL]\n"
1008 "ld1w { z18.s }, p2/Z, [x22, #2, MUL VL]\n"
1009 "ld1w { z19.s }, p1/Z, [x22, #3, MUL VL]\n"
1010 "ld1w { z20.s }, p4/Z, [x21]\n"
1011 "ld1w { z21.s }, p3/Z, [x21, #1, MUL VL]\n"
1012 "ld1w { z22.s }, p2/Z, [x21, #2, MUL VL]\n"
1013 "ld1w { z23.s }, p1/Z, [x21, #3, MUL VL]\n"
1014 "ld1w { z24.s }, p4/Z, [x20]\n"
1015 "ld1w { z25.s }, p3/Z, [x20, #1, MUL VL]\n"
1016 "ld1w { z26.s }, p2/Z, [x20, #2, MUL VL]\n"
1017 "ld1w { z27.s }, p1/Z, [x20, #3, MUL VL]\n"
1018 "b 48f\n"
1019 "47:" // Height 5: no accumulate
1020 "mov z8.s, #0x0\n"
1021 "mov z9.s, #0x0\n"
1022 "mov z10.s, #0x0\n"
1023 "mov z11.s, #0x0\n"
1024 "mov z12.s, #0x0\n"
1025 "mov z13.s, #0x0\n"
1026 "mov z14.s, #0x0\n"
1027 "mov z15.s, #0x0\n"
1028 "mov z16.s, #0x0\n"
1029 "mov z17.s, #0x0\n"
1030 "mov z18.s, #0x0\n"
1031 "mov z19.s, #0x0\n"
1032 "mov z20.s, #0x0\n"
1033 "mov z21.s, #0x0\n"
1034 "mov z22.s, #0x0\n"
1035 "mov z23.s, #0x0\n"
1036 "mov z24.s, #0x0\n"
1037 "mov z25.s, #0x0\n"
1038 "mov z26.s, #0x0\n"
1039 "mov z27.s, #0x0\n"
1040 "48:" // Height 5: setup done
1041 "mov x27, #0x0\n"
1042 "49:" // Height 5: String loop
1043 "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
1044 "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
1045 "ldr w26, [x20, x27, LSL #0x2]\n"
1046 "tbz %x[flags], #3, 50f\n"
1047 "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
1048 "add x20, x20, x19, LSL #3\n"
1049 "ldr x25, [x20, #0x0]\n"
1050 "ldr x24, [x20, #0x8]\n"
1051 "ldr x23, [x20, #0x10]\n"
1052 "ldr x22, [x20, #0x18]\n"
1053 "ldr x21, [x20, #0x20]\n"
1054 "cbnz x27, 51f\n"
1055 "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
1056 "add x25, x25, x19\n"
1057 "add x24, x24, x19\n"
1058 "add x23, x23, x19\n"
1059 "add x22, x22, x19\n"
1060 "add x21, x21, x19\n"
1061 "b 51f\n"
1062 "50:" // Height 5: setup direct input
1063 "mov x25, %x[input_ptr]\n"
1064 "add x24, x25, x19\n"
1065 "add x23, x24, x19\n"
1066 "add x22, x23, x19\n"
1067 "add x21, x22, x19\n"
1068 "51:" // Height 5: input setup done
1069 "cmp x26, #0x10\n"
1070 "ble 53f\n"
1071 "52:" // Height 5: Multiply loop: Main loop head
1072 "ld1b { z6.b }, p5/Z, [x9]\n"
1073 "whilelt p0.b, XZR, x26\n"
1074 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1075 "sub x26, x26, #0x10\n"
1076 "ld1rqb { z0.b }, p0/Z, [x25]\n"
1077 "udot z8.s, z6.b, z0.b[0]\n"
1078 "ld1rqb { z1.b }, p0/Z, [x24]\n"
1079 "cmp x26, #0x10\n"
1080 "udot z9.s, z7.b, z0.b[0]\n"
1081 "ld1rqb { z2.b }, p0/Z, [x23]\n"
1082 "add x25, x25, #0x10\n"
1083 "udot z12.s, z6.b, z1.b[0]\n"
1084 "ld1rqb { z3.b }, p0/Z, [x22]\n"
1085 "add x24, x24, #0x10\n"
1086 "udot z16.s, z6.b, z2.b[0]\n"
1087 "ld1rqb { z4.b }, p0/Z, [x21]\n"
1088 "add x23, x23, #0x10\n"
1089 "udot z13.s, z7.b, z1.b[0]\n"
1090 "add x22, x22, #0x10\n"
1091 "udot z17.s, z7.b, z2.b[0]\n"
1092 "add x21, x21, #0x10\n"
1093 "udot z20.s, z6.b, z3.b[0]\n"
1094 "udot z24.s, z6.b, z4.b[0]\n"
1095 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1096 "udot z21.s, z7.b, z3.b[0]\n"
1097 "udot z25.s, z7.b, z4.b[0]\n"
1098 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1099 "udot z10.s, z6.b, z0.b[0]\n"
1100 "udot z14.s, z6.b, z1.b[0]\n"
1101 "udot z18.s, z6.b, z2.b[0]\n"
1102 "udot z22.s, z6.b, z3.b[0]\n"
1103 "udot z26.s, z6.b, z4.b[0]\n"
1104 "ld1b { z6.b }, p5/Z, [x9, #4, MUL VL]\n"
1105 "udot z11.s, z7.b, z0.b[0]\n"
1106 "udot z15.s, z7.b, z1.b[0]\n"
1107 "udot z19.s, z7.b, z2.b[0]\n"
1108 "udot z23.s, z7.b, z3.b[0]\n"
1109 "udot z27.s, z7.b, z4.b[0]\n"
1110 "ld1b { z7.b }, p5/Z, [x9, #5, MUL VL]\n"
1111 "udot z8.s, z6.b, z0.b[1]\n"
1112 "udot z12.s, z6.b, z1.b[1]\n"
1113 "udot z16.s, z6.b, z2.b[1]\n"
1114 "udot z20.s, z6.b, z3.b[1]\n"
1115 "udot z24.s, z6.b, z4.b[1]\n"
1116 "ld1b { z6.b }, p5/Z, [x9, #6, MUL VL]\n"
1117 "udot z9.s, z7.b, z0.b[1]\n"
1118 "udot z13.s, z7.b, z1.b[1]\n"
1119 "udot z17.s, z7.b, z2.b[1]\n"
1120 "udot z21.s, z7.b, z3.b[1]\n"
1121 "udot z25.s, z7.b, z4.b[1]\n"
1122 "ld1b { z7.b }, p5/Z, [x9, #7, MUL VL]\n"
1123 "addvl x9, x9, #16\n"
1124 "udot z10.s, z6.b, z0.b[1]\n"
1125 "udot z14.s, z6.b, z1.b[1]\n"
1126 "udot z18.s, z6.b, z2.b[1]\n"
1127 "udot z22.s, z6.b, z3.b[1]\n"
1128 "udot z26.s, z6.b, z4.b[1]\n"
1129 "ld1b { z6.b }, p5/Z, [x9, #-8, MUL VL]\n"
1130 "udot z11.s, z7.b, z0.b[1]\n"
1131 "udot z15.s, z7.b, z1.b[1]\n"
1132 "udot z19.s, z7.b, z2.b[1]\n"
1133 "udot z23.s, z7.b, z3.b[1]\n"
1134 "udot z27.s, z7.b, z4.b[1]\n"
1135 "ld1b { z7.b }, p5/Z, [x9, #-7, MUL VL]\n"
1136 "udot z8.s, z6.b, z0.b[2]\n"
1137 "udot z12.s, z6.b, z1.b[2]\n"
1138 "udot z16.s, z6.b, z2.b[2]\n"
1139 "udot z20.s, z6.b, z3.b[2]\n"
1140 "udot z24.s, z6.b, z4.b[2]\n"
1141 "ld1b { z6.b }, p5/Z, [x9, #-6, MUL VL]\n"
1142 "udot z9.s, z7.b, z0.b[2]\n"
1143 "udot z13.s, z7.b, z1.b[2]\n"
1144 "udot z17.s, z7.b, z2.b[2]\n"
1145 "udot z21.s, z7.b, z3.b[2]\n"
1146 "udot z25.s, z7.b, z4.b[2]\n"
1147 "ld1b { z7.b }, p5/Z, [x9, #-5, MUL VL]\n"
1148 "udot z10.s, z6.b, z0.b[2]\n"
1149 "udot z14.s, z6.b, z1.b[2]\n"
1150 "udot z18.s, z6.b, z2.b[2]\n"
1151 "udot z22.s, z6.b, z3.b[2]\n"
1152 "udot z26.s, z6.b, z4.b[2]\n"
1153 "ld1b { z6.b }, p5/Z, [x9, #-4, MUL VL]\n"
1154 "udot z11.s, z7.b, z0.b[2]\n"
1155 "udot z15.s, z7.b, z1.b[2]\n"
1156 "udot z19.s, z7.b, z2.b[2]\n"
1157 "udot z23.s, z7.b, z3.b[2]\n"
1158 "udot z27.s, z7.b, z4.b[2]\n"
1159 "ld1b { z7.b }, p5/Z, [x9, #-3, MUL VL]\n"
1160 "udot z8.s, z6.b, z0.b[3]\n"
1161 "udot z12.s, z6.b, z1.b[3]\n"
1162 "udot z16.s, z6.b, z2.b[3]\n"
1163 "udot z20.s, z6.b, z3.b[3]\n"
1164 "udot z24.s, z6.b, z4.b[3]\n"
1165 "ld1b { z6.b }, p5/Z, [x9, #-2, MUL VL]\n"
1166 "udot z9.s, z7.b, z0.b[3]\n"
1167 "udot z13.s, z7.b, z1.b[3]\n"
1168 "udot z17.s, z7.b, z2.b[3]\n"
1169 "udot z21.s, z7.b, z3.b[3]\n"
1170 "udot z25.s, z7.b, z4.b[3]\n"
1171 "ld1b { z7.b }, p5/Z, [x9, #-1, MUL VL]\n"
1172 "udot z10.s, z6.b, z0.b[3]\n"
1173 "udot z14.s, z6.b, z1.b[3]\n"
1174 "udot z18.s, z6.b, z2.b[3]\n"
1175 "udot z22.s, z6.b, z3.b[3]\n"
1176 "udot z26.s, z6.b, z4.b[3]\n"
1177 "udot z11.s, z7.b, z0.b[3]\n"
1178 "udot z15.s, z7.b, z1.b[3]\n"
1179 "udot z19.s, z7.b, z2.b[3]\n"
1180 "udot z23.s, z7.b, z3.b[3]\n"
1181 "udot z27.s, z7.b, z4.b[3]\n"
1182 "bgt 52b\n"
1183 "53:" // Height 5: Multiply loop: Single iteration only
1184 "ld1b { z6.b }, p5/Z, [x9]\n"
1185 "whilelt p0.b, XZR, x26\n"
1186 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1187 "subs x26, x26, #0x4\n"
1188 "ld1rqb { z0.b }, p0/Z, [x25]\n"
1189 "udot z8.s, z6.b, z0.b[0]\n"
1190 "ld1rqb { z1.b }, p0/Z, [x24]\n"
1191 "udot z9.s, z7.b, z0.b[0]\n"
1192 "ld1rqb { z2.b }, p0/Z, [x23]\n"
1193 "ld1rqb { z3.b }, p0/Z, [x22]\n"
1194 "udot z12.s, z6.b, z1.b[0]\n"
1195 "ld1rqb { z4.b }, p0/Z, [x21]\n"
1196 "udot z13.s, z7.b, z1.b[0]\n"
1197 "udot z16.s, z6.b, z2.b[0]\n"
1198 "udot z20.s, z6.b, z3.b[0]\n"
1199 "udot z24.s, z6.b, z4.b[0]\n"
1200 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1201 "udot z17.s, z7.b, z2.b[0]\n"
1202 "udot z21.s, z7.b, z3.b[0]\n"
1203 "udot z25.s, z7.b, z4.b[0]\n"
1204 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1205 "addvl x9, x9, #4\n"
1206 "udot z10.s, z6.b, z0.b[0]\n"
1207 "udot z14.s, z6.b, z1.b[0]\n"
1208 "udot z18.s, z6.b, z2.b[0]\n"
1209 "udot z22.s, z6.b, z3.b[0]\n"
1210 "udot z26.s, z6.b, z4.b[0]\n"
1211 "udot z11.s, z7.b, z0.b[0]\n"
1212 "udot z15.s, z7.b, z1.b[0]\n"
1213 "udot z19.s, z7.b, z2.b[0]\n"
1214 "udot z23.s, z7.b, z3.b[0]\n"
1215 "udot z27.s, z7.b, z4.b[0]\n"
1216 "ble 54f\n"
1217 "ld1b { z6.b }, p5/Z, [x9]\n"
1218 "udot z8.s, z6.b, z0.b[1]\n"
1219 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1220 "subs x26, x26, #0x4\n"
1221 "udot z12.s, z6.b, z1.b[1]\n"
1222 "udot z16.s, z6.b, z2.b[1]\n"
1223 "udot z20.s, z6.b, z3.b[1]\n"
1224 "udot z24.s, z6.b, z4.b[1]\n"
1225 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1226 "udot z9.s, z7.b, z0.b[1]\n"
1227 "udot z13.s, z7.b, z1.b[1]\n"
1228 "udot z17.s, z7.b, z2.b[1]\n"
1229 "udot z21.s, z7.b, z3.b[1]\n"
1230 "udot z25.s, z7.b, z4.b[1]\n"
1231 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1232 "addvl x9, x9, #4\n"
1233 "udot z10.s, z6.b, z0.b[1]\n"
1234 "udot z14.s, z6.b, z1.b[1]\n"
1235 "udot z18.s, z6.b, z2.b[1]\n"
1236 "udot z22.s, z6.b, z3.b[1]\n"
1237 "udot z26.s, z6.b, z4.b[1]\n"
1238 "udot z11.s, z7.b, z0.b[1]\n"
1239 "udot z15.s, z7.b, z1.b[1]\n"
1240 "udot z19.s, z7.b, z2.b[1]\n"
1241 "udot z23.s, z7.b, z3.b[1]\n"
1242 "udot z27.s, z7.b, z4.b[1]\n"
1243 "ble 54f\n"
1244 "ld1b { z6.b }, p5/Z, [x9]\n"
1245 "udot z8.s, z6.b, z0.b[2]\n"
1246 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1247 "subs x26, x26, #0x4\n"
1248 "udot z12.s, z6.b, z1.b[2]\n"
1249 "udot z16.s, z6.b, z2.b[2]\n"
1250 "udot z20.s, z6.b, z3.b[2]\n"
1251 "udot z24.s, z6.b, z4.b[2]\n"
1252 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1253 "udot z9.s, z7.b, z0.b[2]\n"
1254 "udot z13.s, z7.b, z1.b[2]\n"
1255 "udot z17.s, z7.b, z2.b[2]\n"
1256 "udot z21.s, z7.b, z3.b[2]\n"
1257 "udot z25.s, z7.b, z4.b[2]\n"
1258 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1259 "addvl x9, x9, #4\n"
1260 "udot z10.s, z6.b, z0.b[2]\n"
1261 "udot z14.s, z6.b, z1.b[2]\n"
1262 "udot z18.s, z6.b, z2.b[2]\n"
1263 "udot z22.s, z6.b, z3.b[2]\n"
1264 "udot z26.s, z6.b, z4.b[2]\n"
1265 "udot z11.s, z7.b, z0.b[2]\n"
1266 "udot z15.s, z7.b, z1.b[2]\n"
1267 "udot z19.s, z7.b, z2.b[2]\n"
1268 "udot z23.s, z7.b, z3.b[2]\n"
1269 "udot z27.s, z7.b, z4.b[2]\n"
1270 "ble 54f\n"
1271 "ld1b { z6.b }, p5/Z, [x9]\n"
1272 "udot z8.s, z6.b, z0.b[3]\n"
1273 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1274 "udot z12.s, z6.b, z1.b[3]\n"
1275 "udot z16.s, z6.b, z2.b[3]\n"
1276 "udot z20.s, z6.b, z3.b[3]\n"
1277 "udot z24.s, z6.b, z4.b[3]\n"
1278 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1279 "udot z9.s, z7.b, z0.b[3]\n"
1280 "udot z13.s, z7.b, z1.b[3]\n"
1281 "udot z17.s, z7.b, z2.b[3]\n"
1282 "udot z21.s, z7.b, z3.b[3]\n"
1283 "udot z25.s, z7.b, z4.b[3]\n"
1284 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1285 "addvl x9, x9, #4\n"
1286 "udot z10.s, z6.b, z0.b[3]\n"
1287 "udot z14.s, z6.b, z1.b[3]\n"
1288 "udot z18.s, z6.b, z2.b[3]\n"
1289 "udot z22.s, z6.b, z3.b[3]\n"
1290 "udot z26.s, z6.b, z4.b[3]\n"
1291 "udot z11.s, z7.b, z0.b[3]\n"
1292 "udot z15.s, z7.b, z1.b[3]\n"
1293 "udot z19.s, z7.b, z2.b[3]\n"
1294 "udot z23.s, z7.b, z3.b[3]\n"
1295 "udot z27.s, z7.b, z4.b[3]\n"
1296 "54:" // Height 5: Multiply loop: multiply skip
1297 "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
1298 "add x27, x27, #0x1\n"
1299 "cmp x27, x19\n"
1300 "bne 49b\n"
1301 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1302 "st1w { z8.s }, p4, [x28]\n"
1303 "add x23, x28, x19, LSL #2\n"
1304 "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
1305 "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
1306 "add x22, x23, x19, LSL #2\n"
1307 "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
1308 "add x21, x22, x19, LSL #2\n"
1309 "st1w { z12.s }, p4, [x23]\n"
1310 "add x20, x21, x19, LSL #2\n"
1311 "st1w { z13.s }, p3, [x23, #1, MUL VL]\n"
1312 "addvl x28, x28, #4\n"
1313 "st1w { z14.s }, p2, [x23, #2, MUL VL]\n"
1314 "st1w { z15.s }, p1, [x23, #3, MUL VL]\n"
1315 "st1w { z16.s }, p4, [x22]\n"
1316 "st1w { z17.s }, p3, [x22, #1, MUL VL]\n"
1317 "st1w { z18.s }, p2, [x22, #2, MUL VL]\n"
1318 "st1w { z19.s }, p1, [x22, #3, MUL VL]\n"
1319 "st1w { z20.s }, p4, [x21]\n"
1320 "st1w { z21.s }, p3, [x21, #1, MUL VL]\n"
1321 "st1w { z22.s }, p2, [x21, #2, MUL VL]\n"
1322 "st1w { z23.s }, p1, [x21, #3, MUL VL]\n"
1323 "st1w { z24.s }, p4, [x20]\n"
1324 "st1w { z25.s }, p3, [x20, #1, MUL VL]\n"
1325 "st1w { z26.s }, p2, [x20, #2, MUL VL]\n"
1326 "st1w { z27.s }, p1, [x20, #3, MUL VL]\n"
1327 "55:" // Height 5: Writeback done
1328 "decw x10, ALL, MUL #4\n"
1329 "cmp x10, XZR\n"
1330 "bgt 46b\n"
1331 "b 68f\n"
1332 "56:" // Height 6
1333 "ldr x10, [%x[args_ptr], %[offsetof_N]]\n"
1334 "mov x28, %x[output_ptr]\n"
1335 "ldr x9, [%x[args_ptr], %[offsetof_B_ptr]]\n"
1336 "mov x20, #0x18\n"
1337 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1338 "madd %x[output_ptr], x19, x20, %x[output_ptr]\n"
1339 "57:" // Height 6: Column loop
1340 "mov x19, #0x0\n"
1341 "whilelt p4.s, x19, x10\n"
1342 "incw x19\n"
1343 "whilelt p3.s, x19, x10\n"
1344 "incw x19\n"
1345 "whilelt p2.s, x19, x10\n"
1346 "incw x19\n"
1347 "whilelt p1.s, x19, x10\n"
1348 "tbz %x[flags], #0, 58f\n"
1349 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1350 "ld1w { z8.s }, p4/Z, [x28]\n"
1351 "add x23, x28, x19, LSL #2\n"
1352 "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
1353 "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
1354 "add x22, x23, x19, LSL #2\n"
1355 "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
1356 "add x21, x22, x19, LSL #2\n"
1357 "ld1w { z12.s }, p4/Z, [x23]\n"
1358 "add x20, x21, x19, LSL #2\n"
1359 "ld1w { z13.s }, p3/Z, [x23, #1, MUL VL]\n"
1360 "add x19, x20, x19, LSL #2\n"
1361 "ld1w { z14.s }, p2/Z, [x23, #2, MUL VL]\n"
1362 "ld1w { z15.s }, p1/Z, [x23, #3, MUL VL]\n"
1363 "ld1w { z16.s }, p4/Z, [x22]\n"
1364 "ld1w { z17.s }, p3/Z, [x22, #1, MUL VL]\n"
1365 "ld1w { z18.s }, p2/Z, [x22, #2, MUL VL]\n"
1366 "ld1w { z19.s }, p1/Z, [x22, #3, MUL VL]\n"
1367 "ld1w { z20.s }, p4/Z, [x21]\n"
1368 "ld1w { z21.s }, p3/Z, [x21, #1, MUL VL]\n"
1369 "ld1w { z22.s }, p2/Z, [x21, #2, MUL VL]\n"
1370 "ld1w { z23.s }, p1/Z, [x21, #3, MUL VL]\n"
1371 "ld1w { z24.s }, p4/Z, [x20]\n"
1372 "ld1w { z25.s }, p3/Z, [x20, #1, MUL VL]\n"
1373 "ld1w { z26.s }, p2/Z, [x20, #2, MUL VL]\n"
1374 "ld1w { z27.s }, p1/Z, [x20, #3, MUL VL]\n"
1375 "ld1w { z28.s }, p4/Z, [x19]\n"
1376 "ld1w { z29.s }, p3/Z, [x19, #1, MUL VL]\n"
1377 "ld1w { z30.s }, p2/Z, [x19, #2, MUL VL]\n"
1378 "ld1w { z31.s }, p1/Z, [x19, #3, MUL VL]\n"
1379 "b 59f\n"
1380 "58:" // Height 6: no accumulate
1381 "mov z8.s, #0x0\n"
1382 "mov z9.s, #0x0\n"
1383 "mov z10.s, #0x0\n"
1384 "mov z11.s, #0x0\n"
1385 "mov z12.s, #0x0\n"
1386 "mov z13.s, #0x0\n"
1387 "mov z14.s, #0x0\n"
1388 "mov z15.s, #0x0\n"
1389 "mov z16.s, #0x0\n"
1390 "mov z17.s, #0x0\n"
1391 "mov z18.s, #0x0\n"
1392 "mov z19.s, #0x0\n"
1393 "mov z20.s, #0x0\n"
1394 "mov z21.s, #0x0\n"
1395 "mov z22.s, #0x0\n"
1396 "mov z23.s, #0x0\n"
1397 "mov z24.s, #0x0\n"
1398 "mov z25.s, #0x0\n"
1399 "mov z26.s, #0x0\n"
1400 "mov z27.s, #0x0\n"
1401 "mov z28.s, #0x0\n"
1402 "mov z29.s, #0x0\n"
1403 "mov z30.s, #0x0\n"
1404 "mov z31.s, #0x0\n"
1405 "59:" // Height 6: setup done
1406 "mov x27, #0x0\n"
1407 "60:" // Height 6: String loop
1408 "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
1409 "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
1410 "ldr w26, [x20, x27, LSL #0x2]\n"
1411 "tbz %x[flags], #3, 61f\n"
1412 "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
1413 "add x20, x20, x19, LSL #3\n"
1414 "ldr x25, [x20, #0x0]\n"
1415 "ldr x24, [x20, #0x8]\n"
1416 "ldr x23, [x20, #0x10]\n"
1417 "ldr x22, [x20, #0x18]\n"
1418 "ldr x21, [x20, #0x20]\n"
1419 "ldr x20, [x20, #0x28]\n"
1420 "cbnz x27, 62f\n"
1421 "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
1422 "add x25, x25, x19\n"
1423 "add x24, x24, x19\n"
1424 "add x23, x23, x19\n"
1425 "add x22, x22, x19\n"
1426 "add x21, x21, x19\n"
1427 "add x20, x20, x19\n"
1428 "b 62f\n"
1429 "61:" // Height 6: setup direct input
1430 "mov x25, %x[input_ptr]\n"
1431 "add x24, x25, x19\n"
1432 "add x23, x24, x19\n"
1433 "add x22, x23, x19\n"
1434 "add x21, x22, x19\n"
1435 "add x20, x21, x19\n"
1436 "62:" // Height 6: input setup done
1437 "cmp x26, #0x10\n"
1438 "ble 64f\n"
1439 "63:" // Height 6: Multiply loop: Main loop head
1440 "ld1b { z6.b }, p5/Z, [x9]\n"
1441 "whilelt p0.b, XZR, x26\n"
1442 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1443 "sub x26, x26, #0x10\n"
1444 "ld1rqb { z0.b }, p0/Z, [x25]\n"
1445 "udot z8.s, z6.b, z0.b[0]\n"
1446 "ld1rqb { z1.b }, p0/Z, [x24]\n"
1447 "cmp x26, #0x10\n"
1448 "udot z9.s, z7.b, z0.b[0]\n"
1449 "ld1rqb { z2.b }, p0/Z, [x23]\n"
1450 "add x25, x25, #0x10\n"
1451 "udot z12.s, z6.b, z1.b[0]\n"
1452 "ld1rqb { z3.b }, p0/Z, [x22]\n"
1453 "add x24, x24, #0x10\n"
1454 "udot z16.s, z6.b, z2.b[0]\n"
1455 "ld1rqb { z4.b }, p0/Z, [x21]\n"
1456 "add x23, x23, #0x10\n"
1457 "udot z13.s, z7.b, z1.b[0]\n"
1458 "ld1rqb { z5.b }, p0/Z, [x20]\n"
1459 "add x22, x22, #0x10\n"
1460 "udot z20.s, z6.b, z3.b[0]\n"
1461 "add x21, x21, #0x10\n"
1462 "udot z17.s, z7.b, z2.b[0]\n"
1463 "add x20, x20, #0x10\n"
1464 "udot z24.s, z6.b, z4.b[0]\n"
1465 "udot z28.s, z6.b, z5.b[0]\n"
1466 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1467 "udot z21.s, z7.b, z3.b[0]\n"
1468 "udot z25.s, z7.b, z4.b[0]\n"
1469 "udot z29.s, z7.b, z5.b[0]\n"
1470 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1471 "udot z10.s, z6.b, z0.b[0]\n"
1472 "udot z14.s, z6.b, z1.b[0]\n"
1473 "udot z18.s, z6.b, z2.b[0]\n"
1474 "udot z22.s, z6.b, z3.b[0]\n"
1475 "udot z26.s, z6.b, z4.b[0]\n"
1476 "udot z30.s, z6.b, z5.b[0]\n"
1477 "ld1b { z6.b }, p5/Z, [x9, #4, MUL VL]\n"
1478 "udot z11.s, z7.b, z0.b[0]\n"
1479 "udot z15.s, z7.b, z1.b[0]\n"
1480 "udot z19.s, z7.b, z2.b[0]\n"
1481 "udot z23.s, z7.b, z3.b[0]\n"
1482 "udot z27.s, z7.b, z4.b[0]\n"
1483 "udot z31.s, z7.b, z5.b[0]\n"
1484 "ld1b { z7.b }, p5/Z, [x9, #5, MUL VL]\n"
1485 "udot z8.s, z6.b, z0.b[1]\n"
1486 "udot z12.s, z6.b, z1.b[1]\n"
1487 "udot z16.s, z6.b, z2.b[1]\n"
1488 "udot z20.s, z6.b, z3.b[1]\n"
1489 "udot z24.s, z6.b, z4.b[1]\n"
1490 "udot z28.s, z6.b, z5.b[1]\n"
1491 "ld1b { z6.b }, p5/Z, [x9, #6, MUL VL]\n"
1492 "udot z9.s, z7.b, z0.b[1]\n"
1493 "udot z13.s, z7.b, z1.b[1]\n"
1494 "udot z17.s, z7.b, z2.b[1]\n"
1495 "udot z21.s, z7.b, z3.b[1]\n"
1496 "udot z25.s, z7.b, z4.b[1]\n"
1497 "udot z29.s, z7.b, z5.b[1]\n"
1498 "ld1b { z7.b }, p5/Z, [x9, #7, MUL VL]\n"
1499 "addvl x9, x9, #16\n"
1500 "udot z10.s, z6.b, z0.b[1]\n"
1501 "udot z14.s, z6.b, z1.b[1]\n"
1502 "udot z18.s, z6.b, z2.b[1]\n"
1503 "udot z22.s, z6.b, z3.b[1]\n"
1504 "udot z26.s, z6.b, z4.b[1]\n"
1505 "udot z30.s, z6.b, z5.b[1]\n"
1506 "ld1b { z6.b }, p5/Z, [x9, #-8, MUL VL]\n"
1507 "udot z11.s, z7.b, z0.b[1]\n"
1508 "udot z15.s, z7.b, z1.b[1]\n"
1509 "udot z19.s, z7.b, z2.b[1]\n"
1510 "udot z23.s, z7.b, z3.b[1]\n"
1511 "udot z27.s, z7.b, z4.b[1]\n"
1512 "udot z31.s, z7.b, z5.b[1]\n"
1513 "ld1b { z7.b }, p5/Z, [x9, #-7, MUL VL]\n"
1514 "udot z8.s, z6.b, z0.b[2]\n"
1515 "udot z12.s, z6.b, z1.b[2]\n"
1516 "udot z16.s, z6.b, z2.b[2]\n"
1517 "udot z20.s, z6.b, z3.b[2]\n"
1518 "udot z24.s, z6.b, z4.b[2]\n"
1519 "udot z28.s, z6.b, z5.b[2]\n"
1520 "ld1b { z6.b }, p5/Z, [x9, #-6, MUL VL]\n"
1521 "udot z9.s, z7.b, z0.b[2]\n"
1522 "udot z13.s, z7.b, z1.b[2]\n"
1523 "udot z17.s, z7.b, z2.b[2]\n"
1524 "udot z21.s, z7.b, z3.b[2]\n"
1525 "udot z25.s, z7.b, z4.b[2]\n"
1526 "udot z29.s, z7.b, z5.b[2]\n"
1527 "ld1b { z7.b }, p5/Z, [x9, #-5, MUL VL]\n"
1528 "udot z10.s, z6.b, z0.b[2]\n"
1529 "udot z14.s, z6.b, z1.b[2]\n"
1530 "udot z18.s, z6.b, z2.b[2]\n"
1531 "udot z22.s, z6.b, z3.b[2]\n"
1532 "udot z26.s, z6.b, z4.b[2]\n"
1533 "udot z30.s, z6.b, z5.b[2]\n"
1534 "ld1b { z6.b }, p5/Z, [x9, #-4, MUL VL]\n"
1535 "udot z11.s, z7.b, z0.b[2]\n"
1536 "udot z15.s, z7.b, z1.b[2]\n"
1537 "udot z19.s, z7.b, z2.b[2]\n"
1538 "udot z23.s, z7.b, z3.b[2]\n"
1539 "udot z27.s, z7.b, z4.b[2]\n"
1540 "udot z31.s, z7.b, z5.b[2]\n"
1541 "ld1b { z7.b }, p5/Z, [x9, #-3, MUL VL]\n"
1542 "udot z8.s, z6.b, z0.b[3]\n"
1543 "udot z12.s, z6.b, z1.b[3]\n"
1544 "udot z16.s, z6.b, z2.b[3]\n"
1545 "udot z20.s, z6.b, z3.b[3]\n"
1546 "udot z24.s, z6.b, z4.b[3]\n"
1547 "udot z28.s, z6.b, z5.b[3]\n"
1548 "ld1b { z6.b }, p5/Z, [x9, #-2, MUL VL]\n"
1549 "udot z9.s, z7.b, z0.b[3]\n"
1550 "udot z13.s, z7.b, z1.b[3]\n"
1551 "udot z17.s, z7.b, z2.b[3]\n"
1552 "udot z21.s, z7.b, z3.b[3]\n"
1553 "udot z25.s, z7.b, z4.b[3]\n"
1554 "udot z29.s, z7.b, z5.b[3]\n"
1555 "ld1b { z7.b }, p5/Z, [x9, #-1, MUL VL]\n"
1556 "udot z10.s, z6.b, z0.b[3]\n"
1557 "udot z14.s, z6.b, z1.b[3]\n"
1558 "udot z18.s, z6.b, z2.b[3]\n"
1559 "udot z22.s, z6.b, z3.b[3]\n"
1560 "udot z26.s, z6.b, z4.b[3]\n"
1561 "udot z30.s, z6.b, z5.b[3]\n"
1562 "udot z11.s, z7.b, z0.b[3]\n"
1563 "udot z15.s, z7.b, z1.b[3]\n"
1564 "udot z19.s, z7.b, z2.b[3]\n"
1565 "udot z23.s, z7.b, z3.b[3]\n"
1566 "udot z27.s, z7.b, z4.b[3]\n"
1567 "udot z31.s, z7.b, z5.b[3]\n"
1568 "bgt 63b\n"
1569 "64:" // Height 6: Multiply loop: Single iteration only
1570 "ld1b { z6.b }, p5/Z, [x9]\n"
1571 "whilelt p0.b, XZR, x26\n"
1572 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1573 "subs x26, x26, #0x4\n"
1574 "ld1rqb { z0.b }, p0/Z, [x25]\n"
1575 "udot z8.s, z6.b, z0.b[0]\n"
1576 "ld1rqb { z1.b }, p0/Z, [x24]\n"
1577 "udot z9.s, z7.b, z0.b[0]\n"
1578 "ld1rqb { z2.b }, p0/Z, [x23]\n"
1579 "ld1rqb { z3.b }, p0/Z, [x22]\n"
1580 "udot z12.s, z6.b, z1.b[0]\n"
1581 "ld1rqb { z4.b }, p0/Z, [x21]\n"
1582 "udot z13.s, z7.b, z1.b[0]\n"
1583 "ld1rqb { z5.b }, p0/Z, [x20]\n"
1584 "udot z16.s, z6.b, z2.b[0]\n"
1585 "udot z20.s, z6.b, z3.b[0]\n"
1586 "udot z24.s, z6.b, z4.b[0]\n"
1587 "udot z28.s, z6.b, z5.b[0]\n"
1588 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1589 "udot z17.s, z7.b, z2.b[0]\n"
1590 "udot z21.s, z7.b, z3.b[0]\n"
1591 "udot z25.s, z7.b, z4.b[0]\n"
1592 "udot z29.s, z7.b, z5.b[0]\n"
1593 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1594 "addvl x9, x9, #4\n"
1595 "udot z10.s, z6.b, z0.b[0]\n"
1596 "udot z14.s, z6.b, z1.b[0]\n"
1597 "udot z18.s, z6.b, z2.b[0]\n"
1598 "udot z22.s, z6.b, z3.b[0]\n"
1599 "udot z26.s, z6.b, z4.b[0]\n"
1600 "udot z30.s, z6.b, z5.b[0]\n"
1601 "udot z11.s, z7.b, z0.b[0]\n"
1602 "udot z15.s, z7.b, z1.b[0]\n"
1603 "udot z19.s, z7.b, z2.b[0]\n"
1604 "udot z23.s, z7.b, z3.b[0]\n"
1605 "udot z27.s, z7.b, z4.b[0]\n"
1606 "udot z31.s, z7.b, z5.b[0]\n"
1607 "ble 65f\n"
1608 "ld1b { z6.b }, p5/Z, [x9]\n"
1609 "udot z8.s, z6.b, z0.b[1]\n"
1610 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1611 "subs x26, x26, #0x4\n"
1612 "udot z12.s, z6.b, z1.b[1]\n"
1613 "udot z16.s, z6.b, z2.b[1]\n"
1614 "udot z20.s, z6.b, z3.b[1]\n"
1615 "udot z24.s, z6.b, z4.b[1]\n"
1616 "udot z28.s, z6.b, z5.b[1]\n"
1617 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1618 "udot z9.s, z7.b, z0.b[1]\n"
1619 "udot z13.s, z7.b, z1.b[1]\n"
1620 "udot z17.s, z7.b, z2.b[1]\n"
1621 "udot z21.s, z7.b, z3.b[1]\n"
1622 "udot z25.s, z7.b, z4.b[1]\n"
1623 "udot z29.s, z7.b, z5.b[1]\n"
1624 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1625 "addvl x9, x9, #4\n"
1626 "udot z10.s, z6.b, z0.b[1]\n"
1627 "udot z14.s, z6.b, z1.b[1]\n"
1628 "udot z18.s, z6.b, z2.b[1]\n"
1629 "udot z22.s, z6.b, z3.b[1]\n"
1630 "udot z26.s, z6.b, z4.b[1]\n"
1631 "udot z30.s, z6.b, z5.b[1]\n"
1632 "udot z11.s, z7.b, z0.b[1]\n"
1633 "udot z15.s, z7.b, z1.b[1]\n"
1634 "udot z19.s, z7.b, z2.b[1]\n"
1635 "udot z23.s, z7.b, z3.b[1]\n"
1636 "udot z27.s, z7.b, z4.b[1]\n"
1637 "udot z31.s, z7.b, z5.b[1]\n"
1638 "ble 65f\n"
1639 "ld1b { z6.b }, p5/Z, [x9]\n"
1640 "udot z8.s, z6.b, z0.b[2]\n"
1641 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1642 "subs x26, x26, #0x4\n"
1643 "udot z12.s, z6.b, z1.b[2]\n"
1644 "udot z16.s, z6.b, z2.b[2]\n"
1645 "udot z20.s, z6.b, z3.b[2]\n"
1646 "udot z24.s, z6.b, z4.b[2]\n"
1647 "udot z28.s, z6.b, z5.b[2]\n"
1648 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1649 "udot z9.s, z7.b, z0.b[2]\n"
1650 "udot z13.s, z7.b, z1.b[2]\n"
1651 "udot z17.s, z7.b, z2.b[2]\n"
1652 "udot z21.s, z7.b, z3.b[2]\n"
1653 "udot z25.s, z7.b, z4.b[2]\n"
1654 "udot z29.s, z7.b, z5.b[2]\n"
1655 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1656 "addvl x9, x9, #4\n"
1657 "udot z10.s, z6.b, z0.b[2]\n"
1658 "udot z14.s, z6.b, z1.b[2]\n"
1659 "udot z18.s, z6.b, z2.b[2]\n"
1660 "udot z22.s, z6.b, z3.b[2]\n"
1661 "udot z26.s, z6.b, z4.b[2]\n"
1662 "udot z30.s, z6.b, z5.b[2]\n"
1663 "udot z11.s, z7.b, z0.b[2]\n"
1664 "udot z15.s, z7.b, z1.b[2]\n"
1665 "udot z19.s, z7.b, z2.b[2]\n"
1666 "udot z23.s, z7.b, z3.b[2]\n"
1667 "udot z27.s, z7.b, z4.b[2]\n"
1668 "udot z31.s, z7.b, z5.b[2]\n"
1669 "ble 65f\n"
1670 "ld1b { z6.b }, p5/Z, [x9]\n"
1671 "udot z8.s, z6.b, z0.b[3]\n"
1672 "ld1b { z7.b }, p5/Z, [x9, #1, MUL VL]\n"
1673 "udot z12.s, z6.b, z1.b[3]\n"
1674 "udot z16.s, z6.b, z2.b[3]\n"
1675 "udot z20.s, z6.b, z3.b[3]\n"
1676 "udot z24.s, z6.b, z4.b[3]\n"
1677 "udot z28.s, z6.b, z5.b[3]\n"
1678 "ld1b { z6.b }, p5/Z, [x9, #2, MUL VL]\n"
1679 "udot z9.s, z7.b, z0.b[3]\n"
1680 "udot z13.s, z7.b, z1.b[3]\n"
1681 "udot z17.s, z7.b, z2.b[3]\n"
1682 "udot z21.s, z7.b, z3.b[3]\n"
1683 "udot z25.s, z7.b, z4.b[3]\n"
1684 "udot z29.s, z7.b, z5.b[3]\n"
1685 "ld1b { z7.b }, p5/Z, [x9, #3, MUL VL]\n"
1686 "addvl x9, x9, #4\n"
1687 "udot z10.s, z6.b, z0.b[3]\n"
1688 "udot z14.s, z6.b, z1.b[3]\n"
1689 "udot z18.s, z6.b, z2.b[3]\n"
1690 "udot z22.s, z6.b, z3.b[3]\n"
1691 "udot z26.s, z6.b, z4.b[3]\n"
1692 "udot z30.s, z6.b, z5.b[3]\n"
1693 "udot z11.s, z7.b, z0.b[3]\n"
1694 "udot z15.s, z7.b, z1.b[3]\n"
1695 "udot z19.s, z7.b, z2.b[3]\n"
1696 "udot z23.s, z7.b, z3.b[3]\n"
1697 "udot z27.s, z7.b, z4.b[3]\n"
1698 "udot z31.s, z7.b, z5.b[3]\n"
1699 "65:" // Height 6: Multiply loop: multiply skip
1700 "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
1701 "add x27, x27, #0x1\n"
1702 "cmp x27, x19\n"
1703 "bne 60b\n"
1704 "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1705 "st1w { z8.s }, p4, [x28]\n"
1706 "add x23, x28, x19, LSL #2\n"
1707 "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
1708 "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
1709 "add x22, x23, x19, LSL #2\n"
1710 "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
1711 "add x21, x22, x19, LSL #2\n"
1712 "st1w { z12.s }, p4, [x23]\n"
1713 "add x20, x21, x19, LSL #2\n"
1714 "st1w { z13.s }, p3, [x23, #1, MUL VL]\n"
1715 "add x19, x20, x19, LSL #2\n"
1716 "st1w { z14.s }, p2, [x23, #2, MUL VL]\n"
1717 "addvl x28, x28, #4\n"
1718 "st1w { z15.s }, p1, [x23, #3, MUL VL]\n"
1719 "st1w { z16.s }, p4, [x22]\n"
1720 "st1w { z17.s }, p3, [x22, #1, MUL VL]\n"
1721 "st1w { z18.s }, p2, [x22, #2, MUL VL]\n"
1722 "st1w { z19.s }, p1, [x22, #3, MUL VL]\n"
1723 "st1w { z20.s }, p4, [x21]\n"
1724 "st1w { z21.s }, p3, [x21, #1, MUL VL]\n"
1725 "st1w { z22.s }, p2, [x21, #2, MUL VL]\n"
1726 "st1w { z23.s }, p1, [x21, #3, MUL VL]\n"
1727 "st1w { z24.s }, p4, [x20]\n"
1728 "st1w { z25.s }, p3, [x20, #1, MUL VL]\n"
1729 "st1w { z26.s }, p2, [x20, #2, MUL VL]\n"
1730 "st1w { z27.s }, p1, [x20, #3, MUL VL]\n"
1731 "st1w { z28.s }, p4, [x19]\n"
1732 "st1w { z29.s }, p3, [x19, #1, MUL VL]\n"
1733 "st1w { z30.s }, p2, [x19, #2, MUL VL]\n"
1734 "st1w { z31.s }, p1, [x19, #3, MUL VL]\n"
1735 "66:" // Height 6: Writeback done
1736 "decw x10, ALL, MUL #4\n"
1737 "cmp x10, XZR\n"
1738 "bgt 57b\n"
1739 "subs %x[M], %x[M], #0x6\n"
1740 "beq 68f\n"
1741 "ldr x20, [%x[args_ptr], %[offsetof_input_offset]]\n"
1742 "tbz %x[flags], #3, 67f\n"
1743 "add x20, x20, #0x6\n"
1744 "str x20, [%x[args_ptr], %[offsetof_input_offset]]\n"
1745 "b 1b\n"
1746 "67:" // Update direct input
1747 "mov x19, #0x6\n"
1748 "madd %x[input_ptr], x19, x20, %x[input_ptr]\n"
1749 "b 1b\n"
1750 "68:" // Exit
1751
1752 : [M] "+&r" (M), [input_ptr] "+&r" (input_ptr), [output_ptr] "+&r" (output_ptr)
1753 : [args_ptr] "r" (&ka), [flags] "r" (flags), [offsetof_B_ptr] "I" (offsetof(KernelArgs, B_ptr)), [offsetof_N] "I" (offsetof(KernelArgs, N)), [offsetof_input_initial_col] "I" (offsetof(KernelArgs, input_initial_col)), [offsetof_input_offset] "I" (offsetof(KernelArgs, input_offset)), [offsetof_num_strings] "I" (offsetof(KernelArgs, num_strings)), [offsetof_output_offset] "I" (offsetof(KernelArgs, output_offset)), [offsetof_string_lengths] "I" (offsetof(KernelArgs, string_lengths))
1754 : "cc", "memory", "p0", "p1", "p2", "p3", "p4", "p5", "x9", "x10", "x19", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "z0", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "z9", "z10", "z11", "z12", "z13", "z14", "z15", "z16", "z17", "z18", "z19", "z20", "z21", "z22", "z23", "z24", "z25", "z26", "z27", "z28", "z29", "z30", "z31"
1755 );
1756 }
1757
1758 } // namespace arm_gemm
1759 #endif // ARM_COMPUTE_ENABLE_SVE
1760