I was just disassembling and debugging an ARM binary for fun and I noticed something unusual. Consider the following set of instructions:-
0x00008058 <+4>: mov r1, pc
0x0000805c <+8>: add r1, r1, #24
0x00008060 <+12>: mov r0, #1
I tried setting a breakpoint at 0x0000805c and checked the value of the register r1. I was expecting to see 0x0000805c -- however, interestingly the value is 0x8060.
Why is this? Is this because of some sort of instruction pipelineing?
