fmap is encoded in XO and is 4 bits
+```
crrweird: RT,BFA,M,fmsk,fmap
creg = CR{BFA}
RT[63] = result # MSB0 numbering, 63 is LSB
If Rc:
CR0 = analyse(RT)
+```
When used with SVP64 Prefixing this is a [[sv/normal]]
SVP64 type operation and as such can use Rc=1 and RC1 Data-dependent
fmap is encoded in XO and is 4 bits
+```
mfcrrweird: RT,BFA,fmsk,fmap
creg = CR{BFA}
RT[60:63] = result # MSB0 numbering, 63 is LSB
If Rc:
CR0 = analyse(RT)
+```
When used with SVP64 Prefixing this is a [[sv/normal]]
SVP64 type operation and as such can use Rc=1 and RC1 Data-dependent
fmap is encoded in XO and is 4 bits
+```
mtcrrweird: BF,RA,M,fmsk,fmap
a = (RA|0)
if M:
result |= CR{BF} & ~fmsk
CR{BF} = result
+```
When used with SVP64 Prefixing this is a [[sv/normal]]
SVP64 type operation and as such can use RC1 Data-dependent
**mtcrweird**
+```
mtcrweird: BF,RA,M,fmsk,fmap
reg = (RA|0)
if M:
result |= CR{BF} & ~fmsk
CR{BF} = result
+```
Note that when M=1 this operation is a Read-Modify-Write on the CR Field
BF. Masked-out bits of the 4-bit CR Field BF will not be changed when
the EQ bit from the source may only go into the EQ bit of the
destination (optionally inverted, set, or cleared).
+```
mcrfm: BF,BFA,M,fmsk,fmap
result = fmsk & CR{BFA}
result |= CR{BF} & ~fmsk
result ^= fmap
CR{BF} = result
+```
When M=1 this operation is a Read-Modify-Write on the CR Field
BF. Masked-out bits of the 4-bit CR Field BF will not be changed when
**crweirder**
+```
crweirder: BT,BFA,fmsk,fmap
creg = CR{BFA}
bf = BT[2:4] # select CR field
bit = BT[0:1] # select bit of CR field
CR{bf}[bit] = result # aka the usual "CR[32+BT] = result"
+```
When used with SVP64 Prefixing this is a [[sv/cr_ops]] SVP64
type operation that has 5-bit Data-dependent and 5-bit Predicate-result
**Example Pseudo-ops:**
+```
mtcri BF, fmap mtcrweird BF, r0, 0, 0b1111,~fmap
mtcrset BF, fmsk mtcrweird BF, r0, 1, fmsk,0b0000
mtcrclr BF, fmsk mtcrweird BF, r0, 1, fmsk,0b1111
+```
----------
**crrweird: RT, BB, fmsk.fmap**
+```
for i in range(VL):
if BB.isvec:
creg = CR{BB+i}
iregs[RT+i//8][63-(i%8)] = result
else:
iregs[RT][63-i] = result # results also in scalar INT
+```
Note that:
the limit. Any parts of the destination elements not containing
results are set to zero.
+```
for i in range(VL):
if BB.isvec:
creg = CR{BB+i}
# exceeding VL=16 is UNDEFINED
idx, boff = 0, i
iregs[RT+idx][60-boff*4:63-boff*4] = result
+```
# Predication Examples
Take the following example:
+```
r10 = 0b00010
sv.mtcrweird/dm=r10/dz cr8.v, 0, 0b0011.0000
+```
Here, RA is zero, so the source input is zero. The destination is CR Field
8, and the destination predicate mask indicates to target the first two
[[!tag standards]]
-----------
-\newpage{}