aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2014-05-27 20:37:00 -0400
committerDJ Delorie <dj@gcc.gnu.org>2014-05-27 20:37:00 -0400
commit69c7a374a106057e7c9f219e349178b709bbf370 (patch)
treedcc15801eba9b4952ada8924df55cf3a4599f6fe /gcc/doc
parentfa07538edf51a3399507370ae41a00b473667f52 (diff)
downloadgcc-69c7a374a106057e7c9f219e349178b709bbf370.zip
gcc-69c7a374a106057e7c9f219e349178b709bbf370.tar.gz
gcc-69c7a374a106057e7c9f219e349178b709bbf370.tar.bz2
rx.c (add_vector_labels): New.
* config/rx/rx.c (add_vector_labels): New. (rx_output_function_prologue): Call it. (rx_handle_func_attribute): Don't require empty arguments. (rx_handle_vector_attribute): New. (rx_attribute_table): Add "vector" attribute. * doc/extend.texi (interrupt, vector): Document new/changed RX-specific attributes. * config/rx/rx.c (rx_adjust_insn_length): Skip for non-insns. From-SVN: r210995
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 37465d4..4e1a6b3 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3089,6 +3089,28 @@ On RL78, use @code{brk_interrupt} instead of @code{interrupt} for
handlers intended to be used with the @code{BRK} opcode (i.e.@: those
that must end with @code{RETB} instead of @code{RETI}).
+On RX targets, you may specify one or more vector numbers as arguments
+to the attribute, as well as naming an alternate table name.
+Parameters are handled sequentially, so one handler can be assigned to
+multiple entries in multiple tables. One may also pass the magic
+string @code{"$default"} which causes the function to be used for any
+unfilled slots in the current table.
+
+This example shows a simple assignment of a function to one vector in
+the default table (note that preprocessor macros may be used for
+chip-specific symbolic vector names):
+@smallexample
+void __attribute__ ((interrupt (5))) txd1_handler ();
+@end smallexample
+
+This example assigns a function to two slots in the default table
+(using preprocessor macros defined elsewhere) and makes it the default
+for the @code{dct} table:
+@smallexample
+void __attribute__ ((interrupt (RXD1_VECT,RXD2_VECT,"dct","$default")))
+ txd1_handler ();
+@end smallexample
+
@item interrupt_handler
@cindex interrupt handler functions on the Blackfin, m68k, H8/300 and SH processors
Use this attribute on the Blackfin, m68k, H8/300, H8/300H, H8S, and SH to
@@ -4291,6 +4313,13 @@ When applied to a member function of a C++ class template, the
attribute also means that the function is instantiated if the
class itself is instantiated.
+@item vector
+@cindex @code{vector} attibute
+This RX attribute is similar to the @code{attribute}, including its
+parameters, but does not make the function an interrupt-handler type
+function (i.e. it retains the normal C function calling ABI). See the
+@code{interrupt} attribute for a description of its arguments.
+
@item version_id
@cindex @code{version_id} attribute
This IA-64 HP-UX attribute, attached to a global variable or function, renames a