Predicate select between predicate register or all-false
If the indexed element of the second source predicate is true, place the contents of the first source predicate register into the destination predicate register, otherwise set the destination predicate to all-false. The indexed element is determined by the sum of a general-purpose index register and an immediate, modulo the number of elements. Does not set the condition flags.
For programmer convenience, an assembler must also accept predicate-as-counter register names for the destination predicate register and the first source predicate register.
Variants: FEAT_SME || FEAT_SVE2p1 (FEAT_SME || FEAT_SVE2p1)
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 |
0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | |||||||||||||||||||
i1 | tszh | tszl | Rv | Pn | S | Pm | Pd |
---|
PSEL <Pd>, <Pn>, <Pm>.<T>[<Wv>, <imm>]
if !IsFeatureImplemented(FEAT_SME) && !IsFeatureImplemented(FEAT_SVE2p1) then EndOfDecode(Decode_UNDEF); constant bits(5) imm5 = i1:tszh:tszl; integer esize; integer imm; case tszh:tszl of when '0000' EndOfDecode(Decode_UNDEF); when '1000' esize = 64; imm = UInt(imm5<4>); when 'x100' esize = 32; imm = UInt(imm5<4:3>); when 'xx10' esize = 16; imm = UInt(imm5<4:2>); when 'xxx1' esize = 8; imm = UInt(imm5<4:1>); constant integer n = UInt(Pn); constant integer m = UInt(Pm); constant integer d = UInt(Pd); constant integer v = UInt('011':Rv);
CheckSVEEnabled(); constant integer VL = CurrentVL; constant integer PL = VL DIV 8; constant integer elements = VL DIV esize; constant bits(PL) operand1 = P[n, PL]; constant bits(PL) operand2 = P[m, PL]; constant bits(32) idx = X[v, 32]; constant integer element = (UInt(idx) + imm) MOD elements; bits(PL) result; if ActivePredicateElement(operand2, element, esize) then result = operand1; else result = Zeros(PL); P[d, PL] = result;
If PSTATE.DIT is 1: