mtcrf
Move To Condition Register Fields
Copies bits from a register into the Condition Register, updated only the fields specified by the mask (FXM).
Details
The mfspr instruction moves the contents of a specified Special Purpose Register (SPR) into a general-purpose register RT. If the SPR is 32 bits long, the low-order 32 bits of RT receive the contents, and the high-order 32 bits are set to zero. For SPRs with values from 808 through 811, the instruction is treated as a no-op.
Pseudocode Operation
If FXM[0]=1 then CR0 <- RS[0:3]...
Programming Note
The mtcrf instruction is used to move specific fields of the Condition Register (CR) into general-purpose registers. It's important to note that if the SPR number is between 808 and 811, the instruction acts as a no-op. Ensure that the FXM field correctly specifies which CR fields to transfer to avoid unintended behavior.
Example
Encoding
Operands
-
FXM
Field Mask (8 bits) -
RS
Source Register