mcrfs
Move to Condition Register from FPSCR
Moves a field from the Floating-Point Status and Control Register (FPSCR) to the Condition Register.
Details
The mcrfs instruction moves the contents of the control bits in the FPSCR, including bits 29:31 (DRN) and bits 56:63 (VE, OE, UE, ZE, XE, NI, RN), into the corresponding bits in register FRT. All other bits in register FRT are set to 0. Additionally, it places new_DRN from FRB into bits 62:64 of the FPSCR and updates the DRN field.
Pseudocode Operation
CRf <- FPSCRf
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