[ Previous |
Next |
Contents |
Home |
Search ]

*AIX Version 4.3 Assembler Language Reference*

## Extended Mnemonics of Condition Register Logical Instructions

Extended mnemonics of condition register logical instructions are available in POWER and PowerPC. These extended mnemonics are in the **com** assembly mode. Condition register logical instructions can be used to perform the following operations on a given condition register bit.

- Set bit to 1.
- Clear bit to 0.
- Copy bit.
- Invert bit.

The extended mnemonics shown in the following table allow these operations to be easily coded.

**Condition Register Logical Instruction Extended Mnemonics** |

**Extended Mnemonic** |
**Equivalent to** |
**Meaning** |

**crset** *bx* |
**creqv** *bx*, *bx*, *bx* |
Condition register set |

**crclr** *bx* |
**crxor** *bx*, *bx*, *bx* |
Condition register clear |

**crmove** *bx*, *by* |
**cror** *bx*, *by*, *by* |
Condition register move |

**crnot** *bx*, *by* |
**crnor** *bx*, *by*, *by* |
Condition register NOT |

Since the condition register logical instructions perform the operation on the condition register bit, the assembler supports expressions in all input operands. When using a symbol name to indicate a condition register (CR) field, the symbol name should be multiplied by four to get the correct CR bit, because each CR field has four bits.

### Examples

- To clear the SO bit (bit 3) of CR0:
crclr so

This is equivalent to:
crxor 3, 3, 3

- To clear the EQ bit of CR3:
crclr 4*cr3+eq

This is equivalent to:
crxor 14, 14, 14

- To invert the EQ bit of CR4 and place the result in the SO bit of CR5:
crnot 4*cr5+so, 4*cr4+eq

This is equivalent to:
crnor 23, 18, 18

### Related Information

Extended Instruction Mnemonics Overview.

Extended Mnemonics of Branch Instructions.

Extended Mnemonics of Fixed-Point Arithmetic Instructions.

Extended Mnemonics of Fixed-Point Compare Instructions.

Extended Mnemonics of Fixed-Point Load Instructions.

Extended Mnemonics of Fixed-Point Logical Instructions.

Extended Mnemonics of Fixed-Point Trap Instructions.

Extended Mnemonics of Moving from or to Special-Purpose Registers.

Extended Mnemonics of Fixed-Point Rotate and Shift Instructions.

The **creqv** (Condition Register Equivalent) instruction, **cror** (Condition Register OR) instruction, **crnor** (Condition Register NOR) instruction, **crxor** (Condition Register XOR) instruction.

[ Previous |
Next |
Contents |
Home |
Search ]