ARM / OFFLINE REFERENCE

On this page
← Home

BMOPS

Bitwise exclusive NOR population count outer product, subtracting

This instruction works with 32-bit element ZA tile. This instruction generates an outer product of the first source SVLS×1 vector and the second source 1×SVLS vector. Each outer product element is obtained as population count of the bitwise XNOR result of the corresponding 32-bit elements of the first source vector and the second source vector. Each source vector is independently predicated by a corresponding governing predicate. When either source vector element is inactive the corresponding destination tile element remains unmodified. The resulting SVLS×SVLS product is then destructively subtracted from the destination tile.

SME2 class
(FEAT_SME2)

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 0 0 0 0 0 0 1 0 0 Zm Pm Pn Zn 1 1 0 ZAda
S

Encoding

BMOPS <ZAda>.S, <Pn>/M, <Pm>/M, <Zn>.S, <Zm>.S

Decode

if !IsFeatureImplemented(FEAT_SME2) then EndOfDecode(Decode_UNDEF); end;
let esize : integer{} = 32;
let a : integer = UInt(Pn);
let b : integer = UInt(Pm);
let n : integer = UInt(Zn);
let m : integer = UInt(Zm);
let da : integer = UInt(ZAda);

Assembler Symbols

<ZAda>

Is the name of the ZA tile ZA0-ZA3, encoded in the "ZAda" field.

<Pn>

Is the name of the first governing scalable predicate register P0-P7, encoded in the "Pn" field.

<Pm>

Is the name of the second governing scalable predicate register P0-P7, encoded in the "Pm" field.

<Zn>

Is the name of the first source scalable vector register, encoded in the "Zn" field.

<Zm>

Is the name of the second source scalable vector register, encoded in the "Zm" field.

Operation

CheckStreamingSVEAndZAEnabled();
let VL : integer{} = CurrentVL();
let PL : integer{} = VL DIV 8;
let dim : integer{} = VL DIV esize;
let mask1 : bits(PL) = P{PL}(a);
let mask2 : bits(PL) = P{PL}(b);
let operand1 : bits(VL) = Z{VL}(n);
let operand2 : bits(VL) = Z{VL}(m);
let operand3 : bits(dim*dim*esize) = ZAtile{dim*dim*esize}(da, esize);
var result : bits(dim*dim*esize);

for row = 0 to dim-1 do
    let element1 : bits(esize) = operand1[row*:esize];
    for col = 0 to dim-1 do
        let element2 : bits(esize) = operand2[col*:esize];
        let element3 : bits(esize) = operand3[(row*dim + col)*:esize];
        if (ActivePredicateElement{PL}(mask1, row, esize) &&
              ActivePredicateElement{PL}(mask2, col, esize)) then
            let res : integer = BitCount(NOT(element1 XOR element2));
            result[(row*dim + col)*:esize] = element3 - res;
        else
            result[(row*dim + col)*:esize] = element3;
        end;
    end;
end;
ZAtile{dim*dim*esize}(da, esize) = result;

Operational information

This instruction is a data-independent-time instruction as described in About PSTATE.DIT.


Version 2026.09 — Copyright © 2010-2026 Arm Limited or its affiliates.

This site is provided as a community resource and is NOT affiliated with nor endorsed by Arm Limited.