Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
Program Counter update
Jump...
Cancel
Locked
Locked
Replies
8 replies
Subscribers
119 subscribers
Views
11529 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Program Counter update
Maya Maya
over 12 years ago
Note: This was originally posted on 15th June 2009 at
http://forums.arm.com
In the Architectural Reference Manual for ARMv7 the PC update is described such that it gets update with adding 8 to the current PC while executing an ARM instruction and adding 4 for Thumb instruction. ARM instructions are 32-bit, hence I'd expect the PC to be updated by adding 4 to it rather than 8. Does anyone knows what is the reason behind this? Am I missing something or is it a mistake?
Thanks
Parents
Peter Harris
over 12 years ago
Note: This was originally posted on 16th June 2009 at
http://forums.arm.com
Any Thumb instruction (whether 16-bit or 32-bit) will always see PC + 4; the hardware stitches up the difference.
This is one of those areas where modern processor microarchitecture doesn't really match the original design assumptions, but you need some strict definition of what PC is at any point in time to be able to write software =)
Cancel
Vote up
0
Vote down
Cancel
Reply
Peter Harris
over 12 years ago
Note: This was originally posted on 16th June 2009 at
http://forums.arm.com
Any Thumb instruction (whether 16-bit or 32-bit) will always see PC + 4; the hardware stitches up the difference.
This is one of those areas where modern processor microarchitecture doesn't really match the original design assumptions, but you need some strict definition of what PC is at any point in time to be able to write software =)
Cancel
Vote up
0
Vote down
Cancel
Children
No data