1/* SPDX-License-Identifier: GPL-2.0-or-later 2 * 3 * Test basic matrix multiply assist (MMA) functionality if available. 4 * 5 * Copyright 2020, Alistair Popple, IBM Corp. 6 */ 7 .global test_mma 8test_mma: 9 /* Load accumulator via VSX registers from image passed in r3 */ 10 lxvh8x 4,0,3 11 lxvh8x 5,0,4 12 13 /* Clear and prime the accumulator (xxsetaccz) */ 14 .long 0x7c030162 15 16 /* Prime the accumulator with MMA VSX move to accumulator 17 * X-form (xxmtacc) (not needed due to above zeroing) */ 18 //.long 0x7c010162 19 20 /* xvi16ger2s */ 21 .long 0xec042958 22 23 /* Store result in image passed in r5 */ 24 stxvw4x 0,0,5 25 addi 5,5,16 26 stxvw4x 1,0,5 27 addi 5,5,16 28 stxvw4x 2,0,5 29 addi 5,5,16 30 stxvw4x 3,0,5 31 addi 5,5,16 32 33 blr 34