operand) elwidth field still sets the Integer element size as usual
(8/16/32/default)
-**crrweird: RT, BB, fmsk.fmap**
+**sv.crrweird: RT, BB, fmsk, fmap**
```
for i in range(VL):
- if BB.isvec:
+ if BB.isvec: # Vector CR Field source?
creg = CR{BB+i}
else:
creg = CR{BB}
- n0 = fmsk[0] & (fmap[0] == creg[0])
- n1 = fmsk[1] & (fmap[1] == creg[1])
- n2 = fmsk[2] & (fmap[2] == creg[2])
- n3 = fmsk[3] & (fmap[3] == creg[3])
- # OR or AND to a single bit
- n = (n0||n1||n2||n3) & fmsk
+ n = (¬fmap ^ creg) & fmsk
result = (n != 0) if M else (n == fmsk)
if RT.isvec:
# TODO: RT.elwidth override to be also added here
iregs[RT+i//8][0..55] = 0
iregs[RT+i//8][63-(i%8)] = result
else:
+ # scalar RT destination: exceeding VL=64 is UNDEFINED
iregs[RT][63-i] = result # results also in scalar INT
+ # only mapreduce mode (/mr) allows continuation here
+ if not SVRM.mapreduce: break
```
Note that:
creg = CR{BB+i}
else:
creg = CR{BB}
- n0 = fmsk[0] & (fmap[0] == creg[0])
- n1 = fmsk[1] & (fmap[1] == creg[1])
- n2 = fmsk[2] & (fmap[2] == creg[2])
- n3 = fmsk[3] & (fmap[3] == creg[3])
- result = n0||n1||n2||n3 # 4-bit result
+ result = (¬fmap ^ creg) & fmsk # 4-bit result
if RT.isvec:
# RT.elwidth override can affect the packing
bwid = {0b00:64, 0b01:8, 0b10:16, 0b11:32}[RT.elwidth]
# pack 8 results sequentially into INT registers
idx, boff = i//t8, i%t8
else:
- # exceeding VL=16 is UNDEFINED
+ # scalar RT destination: exceeding VL=16 is UNDEFINED
idx, boff = 0, i
+ # store 4-bit result in Vector starting from RT
iregs[RT+idx][60-boff*4:63-boff*4] = result
+ if not RT.isvec:
+ # only mapreduce mode (/mr) allows continuation here
+ if not SVRM.mapreduce: break
```
# Predication Examples