ZERO (quad-vector)

Zero ZA quad-vector groups

This instruction zeroes one, two, or four ZA quad-vector groups.

The quad-vector group within all of, each half of, or each quarter of the ZA array is selected by the sum of the vector select register and offset range, modulo all, half, or quarter the number of ZA array vectors.

The vector group symbol, VGx2 or VGx4, indicates that the ZA operand consists of two or four ZA quad-vector groups respectively.

Encoding: One ZA quad-vector

Variants: FEAT_SME2p1 (ARMv9.4)

313029282726252423222120191817161514131211109876543210
1100000000001110100000000000
opcRvoff2

ZERO ZA.D[<Wv>, <offs1>:<offs4>]

Decoding algorithm

if !IsFeatureImplemented(FEAT_SME2p1) then EndOfDecode(Decode_UNDEF);
constant integer v = UInt('010':Rv);
constant integer offset = UInt(off2:'00');
constant integer ngrp = 1;
constant integer nvec = 4;

Encoding: Two ZA quad-vectors

Variants: FEAT_SME2p1 (ARMv9.4)

313029282726252423222120191817161514131211109876543210
11000000000011110000000000000
opcRvo1

ZERO ZA.D[<Wv>, <offs1>:<offs4>, VGx2]

Decoding algorithm

if !IsFeatureImplemented(FEAT_SME2p1) then EndOfDecode(Decode_UNDEF);
constant integer v = UInt('010':Rv);
constant integer offset = UInt(o1:'00');
constant integer ngrp = 2;
constant integer nvec = 4;

Encoding: Four ZA quad-vectors

Variants: FEAT_SME2p1 (ARMv9.4)

313029282726252423222120191817161514131211109876543210
11000000000011111000000000000
opcRvo1

ZERO ZA.D[<Wv>, <offs1>:<offs4>, VGx4]

Decoding algorithm

if !IsFeatureImplemented(FEAT_SME2p1) then EndOfDecode(Decode_UNDEF);
constant integer v = UInt('010':Rv);
constant integer offset = UInt(o1:'00');
constant integer ngrp = 4;
constant integer nvec = 4;

Operation

CheckStreamingSVEAndZAEnabled();
constant integer VL = CurrentVL;
constant integer vectors = VL DIV 8;
constant integer vstride = vectors DIV ngrp;
constant bits(32) vbase = X[v, 32];
integer vec = (UInt(vbase) + offset) MOD vstride;
vec = vec - (vec MOD nvec);
for r = 0 to ngrp-1
    for i = 0 to nvec-1
        ZAvector[vec + i, VL] = Zeros(VL);
    vec = vec + vstride;

Explanations

<Wv>: Is the 32-bit name of the vector select register W8-W11, encoded in the "Rv" field.
<offs1>: For the "One ZA quad-vector" variant: is the first vector select offset, encoded as "off2" field times 4.
<offs1>: For the "Four ZA quad-vectors" and "Two ZA quad-vectors" variants: is the first vector select offset, encoded as "o1" field times 4.
<offs4>: For the "One ZA quad-vector" variant: is the fourth vector select offset, encoded as "off2" field times 4 plus 3.
<offs4>: For the "Four ZA quad-vectors" and "Two ZA quad-vectors" variants: is the fourth vector select offset, encoded as "o1" field times 4 plus 3.

Operational Notes

If PSTATE.DIT is 1: