SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Load Byte from Memory with a GDP-Relative 19-Bit Unsigned Constant Offset
LDB *+GDP[ucst19], dst
or
LDBU *+GDP[ucst19], dst
Functional unit = D
32 bit
31 | 16 | 15 | 13 | 12 | 10 | 9 | 0 |
ucst19 | dst | ucst19 | opcode |
16 | 3 | 3 | 10 |
Syntax | Opcode | Load Type |
---|---|---|
LDB *+GDP[ucst19], dst | 01 0000 0110 | Load byte (sign-extended) |
LDBU *+GDP[ucst19], dst | 00 0000 0110 | Load byte unsigned (zero-extended) |
Loads a byte (signed or unsigned) from memory (effective address) to dst. The memory address is formed from the global data pointer register (GDP) and an offset (number of bytes) that is a 19-bit unsigned constant (ucst19). If an offset is not given, the assembler assigns an offset of zero. Brackets, [ ],must surround the specified offset, if using the optional offset parameter.
The square brackets, [ ], indicate that the ucst19 is scaled by a left-shift of 0 bits. After scaling, ucst19 is added to GDP. 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 = *(GDP[ucst19])