Texas Instruments TMS320C67X/C67X+ DSP Car Speaker User Manual


 
LDB(U) Load Byte From Memory With a 15-Bit Unsigned Constant Offset
3-126 Instruction Set SPRU733
Load Byte From Memory With a 15-Bit Unsigned Constant Offset
LDB(U)
Syntax LDB (.unit) *+B14/B15[ucst15], dst
or
LDBU (.unit) *+B14/B15[ucst15], dst
.unit = .D2
Compatibility C62x, C64x, C67x, and C67x+ CPU
Opcode
31 29 28 27 23 22 18 17 13 12 9 8 7 6 4 3 2 1 0
creg z dst ucst15 y op 1 1 s p
3 1 5 15 1 3 1 1
Description Loads a byte from memory to a general-purpose register (dst). Table 318
summarizes the data types supported by loads. The memory address is
formed from a base address register B14 (y = 0) or B15 (y = 1) and an offset,
which is a 15-bit unsigned constant (ucst15). The assembler selects this for-
mat only when the constant is larger than five bits in magnitude. This instruc-
tion operates only on the .D2 unit.
The offset, ucst15, is scaled by a left shift of 0 bits. After scaling, ucst15 is
added to baseR. Subtraction is not supported. The result of the calculation is
the address sent to memory. The addressing arithmetic is always performed
in linear mode.
For LDB(U), the values are loaded into the 8 LSBs of dst. For LDB, the upper
24 bits of dst values are sign-extended; for LDBU, the upper 24 bits of dst are
zero-filled. The s bit determines which file dst will be loaded into: s = 0 indicates
dst will be loaded in the A register file and s = 1 indicates dst will be loaded in
the B register file.
Square brackets, [ ], indicate that the ucst15 offset is left-shifted by 0.
Parentheses, ( ), can be used to set a nonscaled, constant offset. You must
type either brackets or parentheses around the specified offset, if you use the
optional offset parameter.
Table 318. Data Types Supported by LDB(U) Instruction (15-Bit Offset)
Mnemonic
op
Field
Load Data Type SIze
Left
Shift of
Offset
LDB 0 1 0 Load byte 8 0 bits
LDBU 0 0 1 Load byte unsigned 8 0 bits