Texas Instruments TMS320C6000 Series Reference Manual page 118

Table of Contents

Advertisement

Syntax
Opcode
31
29 28 27
creg
z
dst
3
5
Description
Load From Memory With a 15-Bit Constant Offset
LDB (.unit) *+B14/B15[ ucst15 ], dst
or
LDH (.unit) *+B14/B15[ ucst15 ], dst
or
LDW (.unit) *+B14/B15[ ucst15 ], dst
or
LDBU (.unit) *+B14/B15[ ucst15 ], dst
or
LDHU (.unit) *+B14/B15[ ucst15 ], dst
.unit = .D2
23 22
Each of these instructions performs a load from memory to a general-purpose
register ( dst ). Table 3–15 summarizes the data types supported by loads. The
memory address is formed from a base address register ( baseR ) B14 (y = 0)
or B15 (y = 1) and an offset, which is a 15-bit unsigned constant ( ucst15 ). The
assembler selects this format only when the constant is larger than five bits in
magnitude. This instruction operates only on the .D2 unit.
The offset, ucst15, is scaled by a left shift of 0, 1, or 2 for LDB(U), LDH(U), and
LDW, respectively. After scaling, ucst15 is added to baseR . Subtraction is not
supported. The result of the calculation is the address sent to memory. The ad-
dressing arithmetic is always performed in linear mode.
For LDH(U) and LDB(U), the values are loaded into the 16 and 8 LSBs of dst ,
respectively. For LDH and LDB, the upper 16 and 24 bits of dst values are sign-
extended, respectively. For LDHU and LDBU loads, the upper 16 and 24 bits
of dst are zero-filled, respectively. For LDW, the entire 32 bits fills dst . dst can
be in either register file. The s bit determines which file dst will be loaded into:
s = 0 indicates dst is loaded in the A register file, and s = 1 indicates dst is
loaded into the B register file.
Square brackets, [ ], indicate that the ucst 15 offset is left-shifted by 2, 1, or 0
for word, halfword, and byte loads, respectively. Parentheses, ( ), can be used
to set a nonscaled, constant offset. For example, LDW (.unit) *+B14/B15(60)
dst represents an offset of 60 bytes, whereas LDW (.unit) *+B14/B15[60] dst
represents an offset of 60 words, or 240 bytes. You must type either brackets
or parentheses around the specified offset if you use the optional offset param-
eter.
ucst15
15
TMS320C62x/C67x Fixed-Point Instruction Set
LDB(U)/LDH(U)/LDW
8
7
6
4
3
2
y
ld/st
1
1
3
1
0
s
p
3-71

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 Series and is the answer not in the manual?

This manual is also suitable for:

Tms320c67 seriesTms320c62 series

Table of Contents