[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

td (Trap Double Word) Instruction

Purpose

Generate a program interrupt when a specific condition is true.

Syntax

PowerPC
td TO, RA, RB

Description

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.

Parameters

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.

Implementation

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.

Examples

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.

Related Information

Branch Processor.

Fixed-Point Trap Instructions


[ Previous | Next | Contents | Home | Search ]