and reading the exception and interrupt handling chapter of the ARM system design book.

I have noted that link register is not always pointed to the next resume instruction. So it should be added or subtracted when returning.

It's not a big deal to write appropriate assembly code for that. But my question is why they design the processor to behave like that? Is that design is to reduce the complexity and number of transistors? So that complexity could be switched to compiler writer, Am I right guessing why.


Most probably for the reason you guessed: to reduce the amount of hardware needed, and probably more important: to keep the processor fast.

Keep in mind that the ARM is a very old CPU instructions set. These issues might have been important only for the first ARM chip, but once existing applications depend on the behavior it is not easy to change it. The Intel line of CPU's is particularly burdened by this.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.