Copies the contents of a general-purpose register into the condition register under control of a field mask.
Bits | Value |
---|---|
0-5 | 31 |
6-10 | RS |
11 | / |
12-19 | FXM |
20 | / |
21-30 | 144 |
31 | Rc |
mtcrf | FXM, RS |
See Extended Mnemonics of Condition Register Logical Instructions for more information.
The mtcrf instruction copies the contents of source general-purpose register (GPR) RS into the condition register under the control of field mask FXM.
Field mask FXM is defined as follows:
The mtcrf instruction has one syntax form and does not affect the Fixed-Point Exception Register.
The preferred form of the mtcrf instruction has only one bit set in the FXM field.
FXM | Specifies field mask. |
RS | Specifies source general-purpose register for operation. |
The following code copies bits 00-03 of GPR 5 into Condition Register Field 0:
# Assume GPR 5 contains 0x7542 FFEE. # Use the mask for Condition Register # Field 0 (0x80 = b'1000 0000'). mtcrf 0x80,5 # Condition Register Field 0 now contains b'0111'.
Fixed-Point Move to or from Special-Purpose Registers Instructions .