SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Load Byte from Memory with a 3-Bit Unsigned Constant Offset
LDB *+baseR[ucst3], dst
or
LDBU *+baseR[ucst3], dst
Functional unit = D
16 bit
15 | 13 | 12 | 10 | 9 | 7 | 6 | 0 |
dst | baseR | ucst3 | opcode |
3 | 3 | 3 | 7 |
Syntax | Opcode | Load Type |
---|---|---|
LDB *+baseR[ucst3], dst | 101 1010 | Load byte (sign-extended) |
LDBU *+baseR[ucst3], dst | 101 1000 | Load byte unsigned (zero-extended) |
Loads a byte (signed or unsigned) from memory (effective address) to dst. The memory address is formed from a base address register (baseR) and an offset (number of bytes) that is a 3-bit unsigned constant (ucst3). If an offset is not given, the assembler assigns an offset of zero.There must be brackets, [ ], around the specified offset, if using the optional offset parameter.
The square brackets, [ ], indicate that the ucst3 is scaled by a left-shift of 0 bits. After scaling, ucst3 is added to baseR. The result of the calculation is the effective address to be accessed in memory and the content loaded into dst.
The content is loaded into the 8 LSBs of dst. For the LDB instruction, the upper 24 bits of dst are sign-extended; for the LDBU instruction, the upper 24 bits of dst are zero-extended.
None
dst = *(baseR[ucst3])