2 * SME outer product, FZ vs FZ16
3 * SPDX-License-Identifier: GPL-2.0-or-later
9 static void test_fmopa(uint32_t *result
)
11 asm(".arch_extension sme\n\t"
12 "smstart\n\t" /* Z*, P* and ZArray cleared */
13 "ptrue p2.b, vl16\n\t" /* Limit vector length to 16 */
14 "ptrue p5.b, vl16\n\t"
15 "movi d0, #0x00ff\n\t" /* fp16 denormal */
16 "movi d16, #0x00ff\n\t"
17 "mov w15, #0x0001000000\n\t" /* FZ=1, FZ16=0 */
19 "fmopa za3.s, p2/m, p5/m, z16.h, z0.h\n\t"
21 "st1w {za3h.s[w15, 0]}, p2, [%0]\n\t"
23 "st1w {za3h.s[w15, 1]}, p2, [%0]\n\t"
26 "st1w {za3h.s[w15, 0]}, p2, [%0]\n\t"
28 "st1w {za3h.s[w15, 1]}, p2, [%0]\n\t"
31 : "x15", "x16", "p2", "p5", "d0", "d16", "memory");
36 uint32_t result
[4 * 4] = { };
40 if (result
[0] != 0x2f7e0100) {
41 printf("Test failed: Incorrect output in first 4 bytes\n"
44 0x2f7e0100, result
[0]);
48 for (int i
= 1; i
< 16; ++i
) {
50 printf("Test failed: Non-zero word at position %d\n", i
);