SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
Store Word to Memory with a 16-Bit Unsigned Constant Offset
STW dst, *+baseR[ucst16]
Functional unit = D
32 bit
31 | 16 | 15 | 13 | 12 | 10 | 9 | 0 |
ucst16 | dst | baseR | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
16 | 3 | 3 | opcode |
The entire content (word) of dst is stored to memory (effective address). The memory address is formed from a base address register (baseR) and an offset (number of words) that is a 16-bit unsigned constant (ucst16). 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 ucst16 is scaled by a left-shift of 2 bits. After scaling, ucst16 is added to baseR. The result of the calculation is the effective address in memory that contains the content from dst.
Word addresses must be aligned on word (two LSBs are 0) boundaries.
None
*(baseR[ucst16]) = *dst