Extended mnemonics of fixed-point trap instructions
The extended mnemonics for fixed-point trap instructions incorporate the most useful TO operand values.
The extended mnemonics for fixed-point trap instructions incorporate the most useful TO operand values. A standard set of codes, shown in the following table, has been adopted for the most common combinations of trap conditions. These extended mnemonics are in the com assembly mode.
| Code | TO Encoding | Meaning |
|---|---|---|
| lt | 10000 | less than |
| le | 10100 | less than or equal |
| ng | 10100 | not greater than |
| eq | 00100 | equal |
| ge | 01100 | greater than or equal |
| nl | 01100 | not less than |
| gt | 01000 | greater than |
| ne | 11000 | not equal |
| llt | 00010 | logically less than |
| lle | 00110 | logically less than or equal |
| lng | 00110 | logically not greater than |
| lge | 00101 | logically greater than or equal |
| lnl | 00101 | logically not less than |
| lgt | 00001 | logically greater than |
| lne | 00011 | logically not equal |
| None | 11111 | Unconditional |
The POWER® family extended mnemonics for fixed-point trap instructions have the following format:
- txx or txxi
where xx is one of the codes specified in the preceding table.
The 64-bit PowerPC® extended mnemonics for doubleword, fixed-point trap instructions have the following format:
- tdxx or tdxxi
The PowerPC® extended mnemonics for fixed-point trap instructions have the following formats:
- twxx or twxxi
where xx is one of the codes specified in the preceding table.
The trap instruction is an unconditional trap:
- trap
Examples
- To trap if R10 is less than R20:
This is equivalent to:tlt 10, 20t 16, 10, 20 - To trap if R4 is equal to 0x10:
This is equivalent to:teqi 4, 0x10ti 0x4, 4, 0x10 - To trap unconditionally:
This is equivalent to:traptw 31, 0, 0 - To trap if RX is not equal to RY:
This is equivalent to:twnei RX. RYtwi 24, RX, RY - To trap if RX is logically greater than 0x7FF:
This is equivalent to:twlgti RX, 0x7FFtwi 1, RX, 0x7FF