SPRUIY2 November 2024 F29H850TU , F29H859TU-Q1
This is a 33-bit encoding used for direct and indirect encoding of addresses used only for "Direct Addressing" and “Pointer Addressing With #Immediate Offset.”
Table 5-5 shows the various ways the 12 bits can be used to encode the address.
DIRM Field: (Ax = A0 to A14) | ||||||
---|---|---|---|---|---|---|
Mnemonic | Address Generation | 0 | 31:20 | 19:16 | 47:32 | |
*(0:#u32imm) | @u32imm | addr = #u32imm | 0 | #u32imm | ||
*(Ax+#u28imm) | *Ax[#u28imm] | addr = Ax + #u28imm (#u28imm = 0 to 256MB range) | 1 | #u28imm (lower 12-bits) | Ax[0-14] 1 | #u28imm (upper 16-bits) |
The following are the instructions that can use the DIRM field:
LD.32, LD.64, LD.B0, LD.B1, LD.B2, LD.B3, LD.S16, LD.S8, LD.U16, LD.U8, LD.W0, LD.W1, S16TOF, ST.32, ST.64, ST.B0, ST.B1, ST.B2, ST.B3, ST.W0, ST.W1, U16TOF
Examples:
; Bits [7:0] of register Ax are loaded with the 8-bit value at the memory
; location addressed using the DIRM addressing mode. DIRM is supplied with a
; 32-bit unsigned immediate value found in parklSine:
; parklSine = 0x00008000
LD.B0 Ax,DIRM ; field
LD.B0 Ax,@u32imm ; addressing mode
LD.B0 A8,@parklSine ; actual assembly
; The upper 16-bit content of register Ax is stored at the memory location
; addressed using the DIRM addressing mode. The DIRM field is replaced with
; the "*(Ax+#u28imm)" addressing mode, where the address is found using
; base pointer Ax and the #u28imm immediate value.
ST.W1 DIRM,Ax ; field
ST.W1 *(Ax+#u28imm),A10 ; addressing mode
ST.W1 *(A3+#0x4),A10 ; actual assembly