Addressing Modes
Instruction Set3-30 SPRU733
3.8 Addressing Modes
The addressing modes on the C67x DSP are linear, circular using BK0, and
circular using BK1. The addressing mode is specified by the addressing mode
register (AMR), described in section 2.7.3.
All registers can perform linear addressing. Only eight registers can perform
circular addressing: A4−A7 are used by the .D1 unit and B4−B7 are used by
the .D2 unit. No other units can perform circular addressing.
LDB(U)/LDH(U)/LDW, STB/STH/STW, ADDAB/ADDAH/ADDAW/ADDAD,
and SUBAB/SUBAH/SUBAW instructions all use AMR to determine what
type of address calculations are performed for these registers.
3.8.1 Linear Addressing Mode
3.8.1.1 LD and ST Instructions
For load and store instructions, linear mode simply shifts the offsetR/cst
operand to the left by 3, 2, 1, or 0 for doubleword, word, halfword, or byte
access, respectively; and then performs an add or a subtract to baseR
(depending on the operation specified).
For the preincrement, predecrement, positive offset, and negative offset
address generation options, the result of the calculation is the address to be
accessed in memory. For postincrement or postdecrement addressing, the
value of baseR before the addition or subtraction is the address to be accessed
from memory.
3.8.1.2 ADDA and SUBA Instructions
For integer addition and subtraction instructions, linear mode simply shifts the
src1/cst operand to the left by 3, 2, 1, or 0 for doubleword, word, halfword, or
byte data sizes, respectively, and then performs the add or subtract specified.