AND (predicates)

Bitwise AND predicates

Bitwise AND active elements of the second source predicate with corresponding elements of the first source predicate and place the results in the corresponding elements of the destination predicate. Inactive elements in the destination predicate register are set to zero. Does not set the condition flags.

Encoding: Not setting the condition flags

Variants: FEAT_SVE || FEAT_SME (FEAT_SVE || FEAT_SME)

313029282726252423222120191817161514131211109876543210
0010010100000100
opSPmPgo2Pno3Pd

AND <Pd>.B, <Pg>/Z, <Pn>.B, <Pm>.B

Decoding algorithm

if !IsFeatureImplemented(FEAT_SVE) && !IsFeatureImplemented(FEAT_SME) then
    EndOfDecode(Decode_UNDEF);
constant integer esize = 8;
constant integer g = UInt(Pg);
constant integer n = UInt(Pn);
constant integer m = UInt(Pm);
constant integer d = UInt(Pd);
constant boolean setflags = FALSE;

Operation

CheckSVEEnabled();
constant integer VL = CurrentVL;
constant integer PL = VL DIV 8;
constant integer elements = VL DIV esize;
constant bits(PL) mask = P[g, PL];
constant bits(PL) operand1 = P[n, PL];
constant bits(PL) operand2 = P[m, PL];
bits(PL) result;
constant integer psize = esize DIV 8;

for e = 0 to elements-1
    constant bit element1 = PredicateElement(operand1, e, esize);
    constant bit element2 = PredicateElement(operand2, e, esize);
    if ActivePredicateElement(mask, e, esize) then
        Elem[result, e, psize] = ZeroExtend(element1 AND element2, psize);
    else
        Elem[result, e, psize] = ZeroExtend('0', psize);

if setflags then
    PSTATE. = PredTest(mask, result, esize);
P[d, PL] = result;

Explanations

<Pd>: Is the name of the destination scalable predicate register, encoded in the "Pd" field.
<Pg>: Is the name of the governing scalable predicate register, encoded in the "Pg" field.
<Pn>: Is the name of the first source scalable predicate register, encoded in the "Pn" field.
<Pm>: Is the name of the second source scalable predicate register, encoded in the "Pm" field.

Operational Notes

If PSTATE.DIT is 1: