diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2007-05-14 13:52:18 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2007-05-14 13:52:18 +0000 |
commit | a4242737202af64a394f5271c06b8be1979cbcfb (patch) | |
tree | cffefaf9bacdbe3a58b51e69c4fd92063f10a19c /gcc/config/m68k/m68k.md | |
parent | ab6bd6931e768e2348d83da9188d75f24247ff04 (diff) | |
download | gcc-a4242737202af64a394f5271c06b8be1979cbcfb.zip gcc-a4242737202af64a394f5271c06b8be1979cbcfb.tar.gz gcc-a4242737202af64a394f5271c06b8be1979cbcfb.tar.bz2 |
m68k-protos.h: Rename m68k_interrupt_function_p to m68k_get_function_kind.
gcc/
* config/m68k/m68k-protos.h: Rename m68k_interrupt_function_p
to m68k_get_function_kind. Update its prototype.
* config/m68k/m68k.c (m68k_attribute_table): Add an entry for
interrupt_thread.
(m68k_interrupt_function_p): Return enum m68k_function_type
instead of bool. Rename to m68k_get_function_kind.
(m68k_handle_fndecl_attribute): Reject interrupt_thread if the
target is not fido.
(m68k_compute_frame_layout): Don't mark any register for save
if an interrupt_thread attribute is specified.
(m68k_hard_regno_rename_ok): Update a use of
m68k_interrupt_function_p.
* config/m68k/m68k.h (EPILOGUE_USES): Update a use of
m68k_interrupt_function_p.
(m68k_function_type): New.
* config/m68k/m68k.md (*return): Output a 'sleep' instruction
for a function with an interrupt_thread attribute.
* doc/extend.texi: Document the interrupt_thread attribute.
gcc/testsuite/
* gcc.target/m68k/interrupt_thread-1.c,
gcc.target/m68k/interrupt_thread-2.c,
gcc.target/m68k/interrupt_thread-3.c: New.
* gcc.target/m68k/m68k.exp: Accept fido.
From-SVN: r124713
Diffstat (limited to 'gcc/config/m68k/m68k.md')
-rw-r--r-- | gcc/config/m68k/m68k.md | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 78ddf58..19abe62 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -6833,15 +6833,23 @@ [(return)] "" { - if (m68k_interrupt_function_p (current_function_decl)) - return "rte"; - else if (current_function_pops_args) + switch (m68k_get_function_kind (current_function_decl)) { - operands[0] = GEN_INT (current_function_pops_args); - return "rtd %0"; + case m68k_fk_interrupt_handler: + return "rte"; + + case m68k_fk_interrupt_thread: + return "sleep"; + + default: + if (current_function_pops_args) + { + operands[0] = GEN_INT (current_function_pops_args); + return "rtd %0"; + } + else + return "rts"; } - else - return "rts"; }) (define_insn "*m68k_store_multiple" |