37 lines · plain
1/* SPDX-License-Identifier: GPL-2.0-or-later2 *3 * Test basic matrix multiply assist (MMA) functionality if available.4 *5 * Copyright 2020, Alistair Popple, IBM Corp.6 */7 .global test_mma8test_mma:9 /* Load accumulator via VSX registers from image passed in r3 */10 lxvh8x 4,0,311 lxvh8x 5,0,412 13 /* Clear and prime the accumulator (xxsetaccz) */14 .long 0x7c03016215 16 /* Prime the accumulator with MMA VSX move to accumulator17 * X-form (xxmtacc) (not needed due to above zeroing) */18 //.long 0x7c01016219 20 /* xvi16ger2s */21 .long 0xec04295822 23 /* Deprime the accumulator - xxmfacc 0 */24 .long 0x7c00016225 26 /* Store result in image passed in r5 */27 stxvw4x 0,0,528 addi 5,5,1629 stxvw4x 1,0,530 addi 5,5,1631 stxvw4x 2,0,532 addi 5,5,1633 stxvw4x 3,0,534 addi 5,5,1635 36 blr37