SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Store 16-Bit Halfword to Memory with a 6-Bit Unsigned Constant Offset
STHI ucst16, *+baseR[ucst6]
Functional unit = S
32 bit
31 | 16 | 15 | 13 | 12 | 10 | 9 | 7 | 6 | 0 |
ucst19 | ucst6 | baseR | ucst6 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
16 | 3 | 3 | 3 | opcode |
The 16-bit unsigned constant (ucst16) is stored to memory (effective address). The memory address is formed from a base address register (baseR) and an offset (number of halfwords) that is a 6-bit unsigned constant (ucst6). If an offset is not given, the assembler assigns an offset of zero. You must type the brackets, [ ], around the specified offset, if you use the optional offset parameter.
The square brackets, [ ], indicate that the ucst6 is scaled by a left-shift of 1 bit. After scaling, ucst6 is added to baseR. The result of the calculation is the effective address in memory that contains ucst16.
Halfword addresses must be aligned on halfword (LSB is 0) boundaries.
None
*(baseR[ucst6]) = ucst16