ZHCUCH3A November 2024 – March 2025 F29H850TU , F29H859TU-Q1
这是一个 12 位字段,用于对仅用于“具有 #Immediate 偏移的指针寻址”的地址进行间接编码。
表 4-4 展示了使用 12 位对地址进行编码的各种方式。
| ADDR3 字段:(Ax = A0 至 A14) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 助记符 | 简写 | 地址生成 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| *(Ax+#u8imm<<2) | *Ax[#u8imm] | addr = Ax + #u8imm<<2(#u8imm << 2 = 0 至 1KB 范围,4B 步长) | Ax[0-14] 1 | #u8imm | ||||||||||
以下是可以使用 ADDR3 字段的指令:
MV.32
示例:
; The 32-bit content at the memory location addressed using the ADDR3
; addressing mode, ADDR3_x, is copied to the memory location addressed using
; the ADDR3 addressing mode, ADDR3_y. Both ADDR3 fields use the same
; addressing mode "*(Ax+#u8imm<<2)", which calculates the address using a
; base pointer added with an 8-bit immediate (#u8imm) that is multiplied by 4
; (#u8imm<<2). NOTE: The base address must be 32-bit aligned.
MV.32 ADDR3_y,ADDR3_x ; field
MV.32 *(Ax+#u8imm<<2),*(Ax+#u8imm<<2) ; addressing mode
MV.32 *(A0+#4<<2),*(A1+#8<<2) ; actual assembly