Skip to content

Commit

Permalink
extend.texi (Function Attributes): Document SH's sp_switch and trap_e…
Browse files Browse the repository at this point in the history
…xit.

* doc/extend.texi (Function Attributes): Document SH's sp_switch
and trap_exit.

From-SVN: r43293
  • Loading branch information
Alexandre Oliva authored and Alexandre Oliva committed Jun 13, 2001
1 parent 9aaa9ee commit b93e389
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-06-12 Alexandre Oliva <aoliva@redhat.com>

* doc/extend.texi (Function Attributes): Document SH's sp_switch
and trap_exit.

2001-06-13 Joseph S. Myers <jsm28@cam.ac.uk>

* doc/invoke.texi: Use more logical markup. Use TeX quotes,
Expand Down
34 changes: 25 additions & 9 deletions gcc/doc/extend.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1935,22 +1935,15 @@ and 64 entries on the H8/300H) and shares space with the interrupt vector.
You must use GAS and GLD from GNU binutils version 2.7 or later for
this option to work correctly.

@item interrupt_handler
@cindex interrupt handler functions on the H8/300 processors
Use this option on the H8/300 and H8/300H 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.

@item interrupt
@cindex interrupt handler functions
Use this option on the ARM, AVR and M32R/D 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.

Note, interrupt handlers for the H8/300 and H8/300H processors can be
specified via the @code{interrupt_handler} attribute.
Note, interrupt handlers for the H8/300, H8/300H and SH processors can
be specified via the @code{interrupt_handler} attribute.

Note, on the AVR interrupts will be enabled inside the function.

Expand All @@ -1963,6 +1956,29 @@ void f () __attribute__ ((interrupt ("IRQ")));

Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT and UNDEF.

@item interrupt_handler
@cindex interrupt handler functions on the H8/300 and SH processors
Use this option on the H8/300, H8/300H and SH 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.

@item sp_switch
Use this option on the SH to indicate an @code{interrupt_handler}
function should switch to an alternate stack. It expects a string
argument that names a global variable holding the address of the
alternate stack.

@smallexample
void *alt_stack;
void f () __attribute__ ((interrupt_handler, sp_switch ("alt_stack")));
@end smallexample

@item trap_exit
Use this option on the SH for an @code{interrupt_handle} to return using
@code{trapa} instead of @code{rte}. This attribute expects an integer
argument specifying the trap number to be used.

@item eightbit_data
@cindex eight bit data on the H8/300 and H8/300H
Use this option on the H8/300 and H8/300H to indicate that the specified
Expand Down

0 comments on commit b93e389

Please sign in to comment.