gcc: Epiphany Function Attributes

1 
1 6.31.8 Epiphany Function Attributes
1 -----------------------------------
1 
1 These function attributes are supported by the Epiphany back end:
1 
1 'disinterrupt'
1      This attribute causes the compiler to emit instructions to disable
1      interrupts for the duration of the given function.
1 
1 'forwarder_section'
1      This attribute modifies the behavior of an interrupt handler.  The
1      interrupt handler may be in external memory which cannot be reached
1      by a branch instruction, so generate a local memory trampoline to
1      transfer control.  The single parameter identifies the section
1      where the trampoline is placed.
1 
1 'interrupt'
1      Use this attribute to indicate that the specified function is an
1      interrupt handler.  The compiler generates function entry and exit
1      sequences suitable for use in an interrupt handler when this
1      attribute is present.  It may also generate a special section with
1      code to initialize the interrupt vector table.
1 
1      On Epiphany targets one or more optional parameters can be added
1      like this:
1 
1           void __attribute__ ((interrupt ("dma0, dma1"))) universal_dma_handler ();
1 
1      Permissible values for these parameters are: 'reset',
1      'software_exception', 'page_miss', 'timer0', 'timer1', 'message',
1      'dma0', 'dma1', 'wand' and 'swi'.  Multiple parameters indicate
1      that multiple entries in the interrupt vector table should be
1      initialized for this function, i.e. for each parameter NAME, a jump
1      to the function is emitted in the section ivt_entry_NAME.  The
1      parameter(s) may be omitted entirely, in which case no interrupt
1      vector table entry is provided.
1 
1      Note that interrupts are enabled inside the function unless the
1      'disinterrupt' attribute is also specified.
1 
1      The following examples are all valid uses of these attributes on
1      Epiphany targets:
1           void __attribute__ ((interrupt)) universal_handler ();
1           void __attribute__ ((interrupt ("dma1"))) dma1_handler ();
1           void __attribute__ ((interrupt ("dma0, dma1")))
1             universal_dma_handler ();
1           void __attribute__ ((interrupt ("timer0"), disinterrupt))
1             fast_timer_handler ();
1           void __attribute__ ((interrupt ("dma0, dma1"),
1                                forwarder_section ("tramp")))
1             external_dma_handler ();
1 
1 'long_call'
1 'short_call'
1      These attributes specify how a particular function is called.
1      Epiphany Options::) command-line switch and '#pragma long_calls'
1      settings.
1