mcrfs

Move to Condition Register from FPSCR

mcrfs BF, BFA

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

mcrfs cr0, cr1

Encoding

Binary Layout
63
0
BF
6
/
9
BFA
11
/
14
64
21
/
31
 
Format X-form
Opcode 0xFC000040
Extension Floating-Point
Registers Altered CR0, FPSCR

Operands

  • BF
    Target CR
  • BFA
    Src FPSCR
  • CRf
    Condition Register Field
  • FPSCRf
    Floating-Point Status and Control Register Field