3.6.1.9 No-interrupts Option
The -mno-interrupts
option controls whether interrupts
should be disabled when the stack pointer is changed.
For most devices, the state of the status register, SREG, is saved in a temporary register and interrupts are disabled before the stack pointer is adjusted. The status register is then restored after the stack pointer has been changed.
If a program does not use interrupts, there is no need for the stack adjustments to be protected in this way. Use of this option omits the code that disables and potentially re-enables interrupts around the code the adjusts the stack pointer, thus reducing code size and execution time.
Since the AVR XMEGA devices and devices with an 8-bit stack pointer can change the value held by the stack pointer atomically, this option is not required and has no effect when compiling for one of these devices.
Specifying this option will define the preprocessor macro
__NO_INTERRUPTS__
to the value 1.