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.

Table 1. Fixed-Point Trap Instruction Codes
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

  1. To trap if R10 is less than R20:
    
    tlt   10, 20
    
    This is equivalent to:
    
    t   16, 10, 20
    
  2. To trap if R4 is equal to 0x10:
    
    teqi   4, 0x10
    
    This is equivalent to:
    
    ti   0x4, 4, 0x10
    
  3. To trap unconditionally:
    
    trap
    
    This is equivalent to:
    
    tw   31, 0, 0
    
  4. To trap if RX is not equal to RY:
    
    twnei   RX. RY
    
    This is equivalent to:
    
    twi   24, RX, RY
    
  5. To trap if RX is logically greater than 0x7FF:
    
    twlgti   RX, 0x7FF
    
    This is equivalent to:
    
    twi   1, RX, 0x7FF