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

Cortex : Saving registers during interrupts

Hi

Want to know if there is a way to instruct the compiler to preserve more than the normal registers (R0-R3, R12, LR, PSR, and PC) during an interrupt.

Regards
Viktor Bucher

Parents
  • A compiler always (at least if the processor allows it) defines a number of scratch registers that may be used without second thought.

    But any function playing with other registers must take 100% responsibility for such use, and restore the expected state before returning or calling another function that hasn't been explicitly written to accept these exceptional register uses.

Reply
  • A compiler always (at least if the processor allows it) defines a number of scratch registers that may be used without second thought.

    But any function playing with other registers must take 100% responsibility for such use, and restore the expected state before returning or calling another function that hasn't been explicitly written to accept these exceptional register uses.

Children
No data