pmxvi8ger4

Prefixed Masked VSX Vector Integer 8-bit GER

pmxvi8ger4 AT, XA, XB, XMSK, YMSK

Masked version of 8-bit integer MMA.

Details

The pmxvi8ger4 instruction performs a masked accumulation of eight outer products using 8-bit signed integer values from two VSX registers, VSR[XA] and VSR[XB], and updates the Accumulator ACC[AT]. The operation is performed only on elements where the corresponding mask bits in XMSK, YMSK, and PMSK are set.

Pseudocode Operation

ACC[AT][i][j] = si32_CHOP( EXTS(X[i][0]) * EXTS(Y[j][0]) +
                                 EXTS(X[i][1]) * EXTS(Y[j][1]) +
                                 EXTS(X[i][2]) * EXTS(Y[j][2]) +
                                 EXTS(X[i][3]) * EXTS(Y[j][3]) )

Programming Note

This instruction is useful for performing efficient matrix multiplication on 8-bit signed integers with masking. Ensure that the mask registers (XMSK, YMSK, PMSK) are correctly set to control which elements participate in the accumulation. The operation requires VSX registers, so ensure they are properly aligned and accessible at the privilege level required by your application. Be cautious of potential overflow when accumulating products, as the result is chopped to 32 bits.

Example

pmxvi8ger4 acc0, vs2, vs3, 15, 15

Encoding

Binary Layout
1
0
3
6
PMSK
8
XMSK
9
YMSK
14
0
32
59
38
AT
41
/
43
XA
48
XB
53
35
56
AX
57
BX
58
/
 
Format MMIRR-form
Opcode 0x06000000
Extension Prefixed

Operands

  • AT
    Accumulator
  • XA
    Src A
  • XB
    Src B
  • XMSK
    Mask A
  • YMSK
    Mask B