因为预取指令的关系,PC寄存器永远比当前的寄存器多两个指令,ARM模式为大8,Thumb模式为大2,这针对的是32bit的ARMv7的指令集
In ARM state, the value of the PC is the address of the current instruction plus 8 bytes.
In Thumb state:
For B, BL, CBNZ, and CBZ instructions, the value of the PC is the address of the current instruction plus 4 bytes.
For all other instructions that use labels, the value of the PC is the address of the current instruction plus 4 bytes, with bit[1] of the result cleared to 0 to make it word-aligned.
X86是加4
时间: 2024-11-05 23:30:57