to_test = iregs[RA] & testmask & mask
iregs[RT+i] = popcount(to_test)
-TODO: a Vector CR-based version of the same, due to CRs being used for predication.
+TODO: a Vector CR-based version of the same, due to CRs being used for predication. This would use the same testing mechanism as branch: BO[0:2]
+where bit 2 is inv, bits 0:1 select the bit of the CR.
- def iotacr(RT, BA):
+ def iotacr(RT, BA, BO):
mask = get_src_predicate()
count = 0
for i in range(VL):
if mask & (1<<i) == 0: continue
iregs[RT+i] = count
- if test_CR_bit(CR[i+BA]):
+ if test_CR_bit(CR[i+BA], BO):
count += 1
# Scalar