ZHCUCH3A November 2024 – March 2025 F29H850TU , F29H859TU-Q1
这是一种 33 位编码,用于对仅用于“直接寻址”和“具有 #Immediate 偏移的指针寻址”的地址进行直接和间接编码。
表 4-5 展示了使用 12 位对地址进行编码的各种方式。
| DIRM 字段:(Ax = A0 至 A14) | ||||||
|---|---|---|---|---|---|---|
| 助记符 | 地址生成 | 0 | 31:20 | 19:16 | 47:32 | |
| *(0:#u32imm) | @u32imm | addr = #u32imm | 0 | #u32imm | ||
| *(Ax+#u28imm) | *Ax[#u28imm] | addr = Ax + #u28imm(#u28imm = 0 至 256MB 范围) | 1 | #u28imm(低 12 位) | Ax[0-14] 1 | #u28imm(高 16 位) |
以下是可以使用 DIRM 字段的指令:
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
示例:
; 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