mcrfs
Move to Condition Register from FPSCR
Moves a field from the Floating-Point Status and Control Register (FPSCR) to the Condition Register.
Details
Moves a 4-bit field from the Floating-Point Status and Control Register (FPSCR) into a 4-bit field of the Condition Register (CR). The source field is specified by BFA and the destination field by BF. The corresponding FPSCR field is cleared after the move, and no other status fields are affected.
Pseudocode Operation
CR[4*BF:4*BF+3] ← FPSCR[4*BFA:4*BFA+3]
FPSCR[4*BFA:4*BFA+3] ← 0
Programming Note
The mcrfs instruction is commonly used to transfer floating-point status and control information from the FPSCR to a general-purpose register. Ensure that the destination register (FRT) is properly aligned for optimal performance. This instruction operates at user privilege level, but accessing certain bits may require higher privileges depending on system configuration. Be cautious of potential exceptions if the FPSCR contains invalid or unexpected values.
Example
Encoding
Operands
-
BF
Target CR -
BFA
Src FPSCR -
CRf
Condition Register Field -
FPSCRf
Floating-Point Status and Control Register Field