mcrf

Move Condition Register Field

mcrf BF, BFA

Copies the contents of one Condition Register field to another. Used to save comparison results.

Encoding

Binary Layout
00000
0:5
CRFD
6:8
CRFS
9:10
00000
11:13
00000
14:15
00000
16:20
00000
21:30
00000
31
 
Format XL-form
Opcode 0x4C000000
Extension Base

Operands

  • BF
    Target Field (0-7)
  • BFA
    Source Field (0-7)
  • CRFD
    Destination Condition Register Field
  • CRFS
    Source Condition Register Field

Example

mcrf cr0, cr7

// Copy result from CR7 to CR0.

Registers Altered

CR0, CR1-CR7

Related

More in Base

Reference

Description

The contents of Condition Register field BFA are copied to Condition Register field BF.

Operation

CR4×BF+32:4×BF+35 ← CR4×BFA+32:4×BFA+35

Programming Note

Use mcrf to copy condition register fields, ensuring BFA and BF are valid. This instruction operates at user privilege level and does not raise exceptions under normal conditions.