__declspec(interrupt)

Controls the compilation of object code for interrupt service routines.

Syntax
__declspec (interrupt [
  option  [ 
  optionN ]]) void 
  __InterruptHandler__(void);
  
__declspec (interrupt [
  option  [ 
  optionN ]]) void 
  __InterruptHandler__(void) 
  { 
     /* ... */ 
  }
  

where option and optionN are zero or more of the following choices:

Note: If no choice is specified, save_spe is enabled.

enable

Enables interrupts while this interrupt handler is executing.

SRR

Saves the appropriate save/restore register (SRR0 or SRR1) on the stack.

DAR

Saves the data address register on the stack.

DSISR

Saves the DSI status register on the stack.

save_fprs

Saves the floating-point registers on the stack.

save_altivec

Saves the Altivec® registers on the stack.

save_spe

Saves the special-purpose embedded registers on the stack. This is the default.

nowarn

Does not issue a warning message if the function being compiled as an interrupt service routine is larger than the processor's interrupt vector area (256 bytes/64 instructions).

noncritical | critical | machine | debug

Specify the type of interrupt service routine to generate. Specifically, the compiler choose a return instruction based on this choice. The default is noncritical.

vle_multiple

Enables generation of new VLE instructions in the interrupt prolog/epilog in C-functions by the compiler. This option is only valid for e200 (Zen) core. Compile error will be returned if this option is used for any other cores.

When enabled, the compiler:

Remarks

When you declare or define a function with this declaration specification the compiler generates a special prologue and epilogue for the function so that it can respond to a processor interrupt. For convenience, the compiler also marks interrupt functions so that the linker does not dead-strip them.