mfcr

Move From Condition Register

mfcr RT

Copies the entire 32-bit Condition Register into a General Purpose Register.

Details

The mfcr instruction copies the entire condition register CR into the target general-purpose register RT.

Pseudocode Operation

RT ←320 || CR
RT0:31 ←0

Programming Note

The mfcr instruction is commonly used to save the current state of the condition register for later use, such as before a function call or when implementing exception handling. It's important to note that this instruction does not affect any flags in the condition register itself; it merely copies its contents. Ensure that the target general-purpose register RT is properly aligned and accessible at the privilege level where the instruction is executed.

Example

mfcr r3

Encoding

Binary Layout
31
0
RT
6
00000
11
00000
31
19
/
 
Format X-form
Opcode 0x7C000026
Extension Base
Registers Altered CR

Operands

  • RT
    Target Register