mtvsrbmi
Move to Vector Scalar Register with Bit Mask Immediate
Moves a bit mask immediate value into a vector scalar register, setting each byte element based on corresponding bits of the immediate.
Details
Moves an 8-bit immediate value into a VSR (Vector Scalar Register) with each bit of the immediate controlling whether the corresponding byte element is set to all-ones (0xFF) or all-zeros (0x00). This is a Base category instruction that does not affect condition register or other status fields. The instruction provides a quick way to create byte-level masks in vector registers.
Pseudocode Operation
for i in 0 to 7 do
if IMM[i] = 1 then
VSR_target[i*8:(i+1)*8] ← 0xFF
else
VSR_target[i*8:(i+1)*8] ← 0x00
end for
Programming Note
The mtvsrbmi instruction is useful for initializing vector registers with specific byte patterns based on an immediate bit mask. Ensure that the immediate value correctly reflects the desired byte-wise initialization to avoid unexpected results. This instruction operates at user privilege level and does not raise exceptions under normal conditions.
Example
Encoding
Operands
-
VRT
Target vector scalar register that receives the byte mask pattern generated from the immediate value. -
IMM8
8-bit immediate value where each bit controls the corresponding byte element (1 = 0xFF, 0 = 0x00).