码迷,mamicode.com
首页 > 其他好文 > 详细

PC寄存器的真实状态

时间:2015-12-09 23:21:38      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:

因为预取指令的关系,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

PC寄存器的真实状态

标签:

原文地址:http://www.cnblogs.com/cascle/p/5034530.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!