With the scalar OpenPOWER v3.0B ISA having already popcnt, cntlz and others normally seen in Vector Mask operations it makes sense to allow *both* scalar integers *and* CR-Vectors to be predicate masks. That in turn means that much more comprehensive interaction between CRs and scalar Integers is required.
-The opportunity is therefore taken to also augment CR logical arithmetic as well, using a mask-based paradigm that takes into consideration multiple bits of each CR (eq/lt/gt/ov). v3.0B Scalar CR instructions (crand, crxor) only allow a single bit calculation.
+The opportunity is therefore taken to also augment CR logical arithmetic as well, using a mask-based paradigm that takes into consideration multiple bits of each CR (eq/lt/gt/ov). By contrast
+v3.0B Scalar CR instructions (crand, crxor) only allow a single bit calculation.
Basic concept:
-* CR-based instructions that perform simple AND/OR/XOR from all four bits
- of a CR to create a single bit value (0/1) in an integer register
+* CR-based instructions that perform simple AND/OR/XOR from any four bits
+ of a CR field to create a single bit value (0/1) in an integer register
* Inverse of the same, taking a single bit value (0/1) from an integer
- register to selectively target all four bits of a given CR
+ register to selectively target any four bits of a given CR Field
* CR-to-CR version of the same, allowing multiple bits to be AND/OR/XORed
in one hit.
-* Vectorisation of the same
+* Optional Vectorisation of the same when SVP64 is implemented
Purpose:
If Rc:
CR0 = analyse(RT)
-This is a [[openpower/sv/normal]] SVP64 type operation and as
+When used with SVP64 Prefixing this is a [[openpower/sv/normal]] SVP64 type operation and as
such can use Rc=1 and RC1 Data-dependent Mode capability
**mtcrweird**
n3 = mask[3] & (mode[3] == lsb)
CR{BT} = n0 || n1 || n2 || n3
-This is a [[openpower/sv/cr_ops]] SVP64 type operation that has
+When used with SVP64 Prefixing this is a [[openpower/sv/cr_ops]] SVP64 type operation that has
3-bit Data-dependent and 3-bit Predicate-result capability
(BT is 3 bits)
n3 = mask[3] & (mode[3] == creg[3])
CR{BT} = n0 || n1 || n2 || n3
-This is a [[openpower/sv/cr_ops]] SVP64 type operation that has
+When used with SVP64 Prefixing this is a [[openpower/sv/cr_ops]] SVP64 type operation that has
3-bit Data-dependent and 3-bit Predicate-result capability
(BT is 3 bits)
result = n0|n1|n2|n3 if M else n0&n1&n2&n3
CR{BF}[bit] = result
-This is a [[openpower/sv/cr_ops]] SVP64 type operation that has
+When used with SVP64 Prefixing this is a [[openpower/sv/cr_ops]] SVP64 type operation that has
5-bit Data-dependent and 5-bit Predicate-result capability
(BFT is 5 bits)