Contents

3 Instruction Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

Describes the assembly language instructions of the TMS320C67x DSP. Also described are parallel operations, conditional operations, resource constraints, and addressing modes.

3.1 Instruction Operation and Execution Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23.2 Instruction Syntax and Opcode Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73.3 Overview of IEEE Standard Single- and Double-Precision Formats . . . . . . . . . . . . . . . . 3-93.4 Delay Slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-143.5 Parallel Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16

3.5.1 Example Parallel Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-183.5.2 Branching Into the Middle of an Execute Packet . . . . . . . . . . . . . . . . . . . . . . . . 3-18

3.6 Conditional Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-193.7 Resource Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-203.7.1 Constraints on Instructions Using the Same Functional Unit . . . . . . . . . . . . . . 3-20

3.7.2Constraints on the Same Functional Unit Writing in the

Same Instruction Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-203.7.3 Constraints on Cross Paths (1X and 2X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-213.7.4 Constraints on Loads and Stores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-223.7.5 Constraints on Long (40-Bit) Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-233.7.6 Constraints on Register Reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-243.7.7 Constraints on Register Writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-253.7.8 Constraints on Floating-Point Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26

3.8 Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-303.8.1 Linear Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-303.8.2 Circular Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-313.8.3 Syntax for Load/Store Address Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32

3.9 Instruction Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-343.10 Instruction Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34ABS (Absolute Value With Saturation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38ABSDP (Absolute Value, Double-Precision Floating-Point) . . . . . . . . . . . . . . . . . . . . . . 3-40ABSSP (Absolute Value, Single-Precision Floating-Point) . . . . . . . . . . . . . . . . . . . . . . . 3-42ADD (Add Two Signed Integers Without Saturation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44ADDAB (Add Using Byte Addressing Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48ADDAD (Add Using Doubleword Addressing Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50ADDAH (Add Using Halfword Addressing Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52ADDAW (Add Using Word Addressing Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54ADDDP (Add Two Double-Precision Floating-Point Values) . . . . . . . . . . . . . . . . . . . . . 3-56ADDK (Add Signed 16-Bit Constant to Register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-59ADDSP (Add Two Single-Precision Floating-Point Values) . . . . . . . . . . . . . . . . . . . . . . 3-60ADDU (Add Two Unsigned Integers Without Saturation) . . . . . . . . . . . . . . . . . . . . . . . . 3-63ADD2 (Add Two 16-Bit Integers on Upper and Lower Register Halves) . . . . . . . . . . . 3-65AND (Bitwise AND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-67B (Branch Using a Displacement) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-69B (Branch Using a Register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-71B IRP (Branch Using an Interrupt Return Pointer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73B NRP (Branch Using NMI Return Pointer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-75

vi

Contents

SPRU733

Page 6
Image 6
Texas Instruments TMS320C67X/C67X+ DSP manual Instruction Set