m68k.c (m68k_attribute_table): Add "interrupt".

* config/m68k/m68k.c (m68k_attribute_table): Add "interrupt".
	(m68k_get_function_kind): Return m68k_fk_interrupt_handler on
	"interrupt".
	* doc/extend.texi (interrupt): Mention m68k.

From-SVN: r125290
This commit is contained in:
Kazu Hirata 2007-06-03 00:43:21 +00:00 committed by Kazu Hirata
parent 097dbf654d
commit 2bccb817ce
3 changed files with 22 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2007-06-03 Kazu Hirata <kazu@codesourcery.com>
* config/m68k/m68k.c (m68k_attribute_table): Add "interrupt".
(m68k_get_function_kind): Return m68k_fk_interrupt_handler on
"interrupt".
* doc/extend.texi (interrupt): Mention m68k.
2007-06-02 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Call

View File

@ -222,6 +222,7 @@ int m68k_last_compare_had_fp_operands;
static const struct attribute_spec m68k_attribute_table[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
{ "interrupt", 0, 0, true, false, false, m68k_handle_fndecl_attribute },
{ "interrupt_handler", 0, 0, true, false, false, m68k_handle_fndecl_attribute },
{ "interrupt_thread", 0, 0, true, false, false, m68k_handle_fndecl_attribute },
{ NULL, 0, 0, false, false, false, NULL }
@ -634,9 +635,10 @@ m68k_cpp_cpu_family (const char *prefix)
return concat ("__m", prefix, "_family_", m68k_cpu_entry->family, NULL);
}
/* Return m68k_fk_interrupt_handler if FUNC has an "interrupt_handler"
attribute and interrupt_thread if FUNC has an "interrupt_thread"
attribute. Otherwise, return m68k_fk_normal_function. */
/* Return m68k_fk_interrupt_handler if FUNC has an "interrupt" or
"interrupt_handler" attribute and interrupt_thread if FUNC has an
"interrupt_thread" attribute. Otherwise, return
m68k_fk_normal_function. */
enum m68k_function_kind
m68k_get_function_kind (tree func)
@ -646,6 +648,10 @@ m68k_get_function_kind (tree func)
if (TREE_CODE (func) != FUNCTION_DECL)
return false;
a = lookup_attribute ("interrupt", DECL_ATTRIBUTES (func));
if (a != NULL_TREE)
return m68k_fk_interrupt_handler;
a = lookup_attribute ("interrupt_handler", DECL_ATTRIBUTES (func));
if (a != NULL_TREE)
return m68k_fk_interrupt_handler;

View File

@ -2043,12 +2043,13 @@ This attribute is ignored for R8C target.
@item interrupt
@cindex interrupt handler functions
Use this attribute on the ARM, AVR, C4x, CRX, M32C, M32R/D, MS1, 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.
Use this attribute on the ARM, AVR, C4x, CRX, M32C, M32R/D, m68k, MS1,
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.
Note, interrupt handlers for the Blackfin, m68k, H8/300, H8/300H, H8S, and
Note, interrupt handlers for the Blackfin, H8/300, H8/300H, H8S, and
SH processors can be specified via the @code{interrupt_handler} attribute.
Note, on the AVR, interrupts will be enabled inside the function.