aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeremy Bennett <jeremy.bennett@embecosm.com>2012-03-01 23:34:36 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2012-03-01 23:34:36 +0000
commit08b03910db6745fed195d7a4562cd330441b1f5b (patch)
tree609026f63252e2a4aa4ea00e5175306f8b547b80 /gcc
parent1ce35c11f79daf56cc745e7b8eb9e98853838c1f (diff)
downloadgcc-08b03910db6745fed195d7a4562cd330441b1f5b.zip
gcc-08b03910db6745fed195d7a4562cd330441b1f5b.tar.gz
gcc-08b03910db6745fed195d7a4562cd330441b1f5b.tar.bz2
extend.texi: Expand and update information on interrupt attribute for Epiphany.
2012-03-01 Jeremy Bennett <jeremy.bennett@embecosm.com> Joern Rennecke <joern.rennecke@embecosm.com> * doc/extend.texi: Expand and update information on interrupt attribute for Epiphany. Co-Authored-By: Joern Rennecke <joern.rennecke@embecosm.com> From-SVN: r184765
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/extend.texi45
2 files changed, 50 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3223296..8da0464 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-01 Jeremy Bennett <jeremy.bennett@embecosm.com>
+ Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * doc/extend.texi: Expand and update information on interrupt
+ attribute for Epiphany.
+
2012-03-01 Oleg Endo <olegendo@gcc.gnu.org>
* config/sh/sh-protos.h: Update copyright notice dates.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index aa3518c..c770e35 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2719,7 +2719,8 @@ Use this attribute on the ARM, AVR, CR16, Epiphany, M32C, M32R/D, m68k, MeP, MIP
RL78, RX and Xstormy16 ports to indicate that the specified function is an
interrupt handler. The compiler will generate function entry and exit
sequences suitable for use in an interrupt handler when this attribute
-is present.
+is present. With Epiphany targets it may also generate a special section with
+code to initialize the interrupt vector table.
Note, interrupt handlers for the Blackfin, H8/300, H8/300H, H8S, MicroBlaze,
and SH processors can be specified via the @code{interrupt_handler} attribute.
@@ -2738,6 +2739,48 @@ Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT and UNDEF@.
On ARMv7-M the interrupt type is ignored, and the attribute means the function
may be called with a word aligned stack pointer.
+On Epiphany targets one or more optional parameters can be added like this:
+
+@smallexample
+void __attribute__ ((interrupt ("dma0, dma1"))) universal_dma_handler ();
+@end smallexample
+
+Permissible values for these parameters are: @w{@code{reset}},
+@w{@code{software_exception}}, @w{@code{page_miss}},
+@w{@code{timer0}}, @w{@code{timer1}}, @w{@code{message}},
+@w{@code{dma0}}, @w{@code{dma1}}, @w{@code{wand}} and @w{@code{swi}}.
+Multiple parameters indicate that multiple entries in the interrupt
+vector table should be initialized for this function, i.e. for each
+parameter @w{@var{name}}, a jump to the function will be emitted in
+the section @w{ivt_entry_@var{name}}. The parameter(s) may be omitted
+entirely, in which case no interrupt vector table entry will be provided.
+
+Note, on Epiphany targets, interrupts are enabled inside the function
+unless the @code{disinterrupt} attribute is also specified.
+
+On Epiphany targets, you can also use the following attribute to
+modify the behavior of an interrupt handler:
+@table @code
+@item forwarder_section
+@cindex @code{forwarder_section} attribute
+The interrupt handler may be in external memory which cannot be
+reached by a branch instruction, so generate a local memory trampoline
+to transfer control. The single parameter identifies the section where
+the trampoline will be placed.
+@end table
+
+The following examples are all valid uses of these attributes on
+Epiphany targets:
+@smallexample
+void __attribute__ ((interrupt)) universal_handler ();
+void __attribute__ ((interrupt ("dma1"))) dma1_handler ();
+void __attribute__ ((interrupt ("dma0, dma1"))) universal_dma_handler ();
+void __attribute__ ((interrupt ("timer0"), disinterrupt))
+ fast_timer_handler ();
+void __attribute__ ((interrupt ("dma0, dma1"), forwarder_section ("tramp")))
+ external_dma_handler ();
+@end smallexample
+
On MIPS targets, you can use the following attributes to modify the behavior
of an interrupt handler:
@table @code