Msg/IntrClobberedSP: Difference between revisions

From CPUlator Wiki

< Msg
Created page with "An interrupt handler should always ensure that the stack pointer and some control registers are the same at the entry and exit of the function. This message tells you that thi..."
 
No edit summary
Line 2: Line 2:


=== Debugging ===
=== Debugging ===
See [[Msg/ClobberedSP]], which is a similar error for functions instead of interrupts.
See [[Msg/ClobberedSP]], which is a similar warning for functions.


=== Implementation ===
=== Implementation ===

Revision as of 06:15, 10 March 2019

An interrupt handler should always ensure that the stack pointer and some control registers are the same at the entry and exit of the function. This message tells you that this didn't happen: the stack pointer or control register was different at the interrupt return than when the interrupt handler started executing.

Debugging

See Msg/ClobberedSP, which is a similar warning for functions.

Implementation

The simulator identifies interrupts and return-from-interrupt instructions executed at runtime. It records the values of registers at interrupts, and verifies that they haven't changed when executing the matching interrupt return This warning is generated at the interrupt return instruction.

Disabling this message

This debugging check can be disabled in the Debugging Checks section of the Settings box: Interrupt clobbered ea, ra, sp, or a ctl reg.

ARMv7: Interrupt clobbered sp or spsr, or bad return