When the CPU receives an interrupt, it must save some of the current status of the CPU before invoking the interrupt handler so that it can be restored when the interrupt handler is finished. These data include the current flags and value of the program counter, and usually some other registers. (Jeroen3's answer gives the full details for this particular CPU.)
When an interrupt handler is currently running, other interrupts can arrive. Depending on the relative priority of the two interrupts, one of two things can happen:
1. The new interrupt is higher priority, and interrupts the current interrupt handler, just as that had interrupted the main program. Once the new interrupts handler is complete, control returns to the previous interrupt handler and, once that's complete, control returns to the main program.
2. The new interrupt is lower priority, so it's "saved" until the current interrupt handler is complete. At that point the new interrupt's handler can run.
Thus, in this second case, where another interupt is pending but blocked until the current interrupt handler is complete, you might see a flow like this:
- First interrupt arrives
- Second (lower-priority) interrupt arrives.
- Current instruction of the main program completes.
- Save current registers on to the stack.
- Call first interrupt handler.
- Restore registers from stack.
- Save current registers on to the stack (again).
- Call second interrupt handler.
- Restore registers from stack.
Here step 6 above restores the registers from the stack, only to have step 7 save the exact same data from the unchanged registers back on to the stack, leaving the stack unchanged after those two steps.
Dropping steps 6 and 7 doesn't change the behaviour at all, and saves the time it takes to read the data only to write it back again. This is the optimization they are using.
(Actually, it isn't quite true that the behaviour is unchanged, becuase depending on how the CPU sets the registers before entry to an interrupt handler, the interrupt handler may see different data in the registers. For example, if register R0 is left at the current value on entry to the first interrupt handler, but it changes R0, the following interrupt handler will see the value that the first interrupt handler left behind in R0, not the value that had been there before the first interrupt handler was called. This isn't a problem because normally an interrupt handler wouldn't care what (essentially random) value was in R0 when it started. If it did care, it should read the value from the stack rather than assuming what's in R0 is what what the interrupted routine had in R0 when it was interrupted.)