Generate a program interrupt when a specific condition is true.
This instruction should only be used on 64-bit PowerPC processors running a 64-bit application.
Bits | Value |
---|---|
0-5 | 31 |
6-10 | TO |
11-15 | A |
16-20 | B |
21-30 | 68 |
31 | 0 |
PowerPC64 | |
---|---|
td | TO, RA, RB |
The contents of general-purpose register (GPR) RA are compared with the contents of GPR RB. If any bit in the TO field is set and its corresponding condition is met by the result of the comparison, then a trap-type program interrupt is generated.
The TO bit conditions are defined as follows:
TO bit | ANDed with Condition |
---|---|
0 | Compares Less Than. |
1 | Compares Greater Than. |
2 | Compares Equal. |
3 | Compares Logically Less Than. |
4 | Compares Logically Greater Than. |
TO | Specifies TO bits that are ANDed with compare results. |
RA | Specifies source general-purpose register for compare. |
RB | Specifies source general-purpose register for compare. |
This instruction is defined only for 64-bit implementations. Using it on a 32-bit implementation will cause the system illegal instruction error handler to be invoked.
The following code generates a program interrupt:
# Assume GPR 3 holds 0x0000_0000_0000_0001. # Assume GPR 4 holds 0x0000_0000_0000_0000. td 0x2,3,4 # A trap type Program Interrupt occurs.