aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@st.com>2006-01-30 15:07:43 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2006-01-30 15:07:43 +0000
commita6ab9fc0872bbc3330490c0e3ad5d0a61dbe4458 (patch)
tree2c0dc139501a3b56003fa7a9d0a9f3e5ae212d8e /gcc/config.gcc
parent52a64bd38e2af65bef3c1c4f4d93e0477c56ec15 (diff)
downloadgcc-a6ab9fc0872bbc3330490c0e3ad5d0a61dbe4458.zip
gcc-a6ab9fc0872bbc3330490c0e3ad5d0a61dbe4458.tar.gz
gcc-a6ab9fc0872bbc3330490c0e3ad5d0a61dbe4458.tar.bz2
re PR target/14798 (In case of SH target with -O2 option #pragma interrupt doesn't get resetted.)
PR target/14798: gcc: * sh.c (pragma_interrupt, trap_exit, sp_switch): Remove variable. (pragma_trap, pragma_nosave_low_regs): Likewise. (current_function_anonymous_args): Likewise. (sh_deferred_function_attributes): New variable. (sh_deferred_function_attributes_tail): Likewise. (print_operand): For '@', look up trap_exit attribute. (calc_live_regs): Look up trapa_handler attribute. For trapa handlers, save/restore fpscr, but don't do any other interrupt-specific saves. Don't save r0..r7 if the nosave_low_regs attribute is in effect. Fix check for partially saved registers to check for SHmedia. (sh_expand_prologue, sh_expand_epilogue): Look up sp_switch attribute. (sh_output_function_epilogue): Don't clear any of the removed variables. (sh_insert_attributes): Don't check pragma_interrupt. Insert deferred attributes. Check that interrupt attribute is present for other attributes that require its presence. (sh_attribute_table): Add new attributes trapa_handler and nosave_low_regs. (sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute): Don't check for pragma_interrupt. Don't store argument. * sh.h (pragma_interrupt, sp_switch): Don't declare. (sh_deferred_function_attributes): Declare. (sh_deferred_function_attributes_tail): Likewise. * sh.md (sp_switch_1): Add operand. Change generator caller. (sh_pr_interrupt, sh_pr_trapa, sh_pr_nosave_low_regs): Remove. (*return_i): Don't use when trap_exit attribute is in effect. (*return_trapa): New insn pattern. * sh-c.c: New file. * config.gcc (sh[123456ble]*-* | sh-*-*): New trailer stanza, setting c_target_objs and cxx_target_objs. * t-sh: Add rule for sh-c.o. gcc/testsuite: * gcc.dg/pragma-isr.c: Added target sh[1234ble]*-*-*. * gcc.dg/pragma-isr2.c, gcc.dg/pragma-isr-trapa.c: New tests. * gcc.dg/pragma-isr-trapa2.c: Likewise. * gcc.dg/pragma-isr-nosave_low_regs.c: Likewise. * gcc.dg/pragma-isr-trap_exit.c: Likewise. * gcc.dg/attr-isr.c, gcc.dg/attr-isr-trapa.c: Likewise. * gcc.dg/attr-isr-trap_exit.c: Likewise. * gcc.dg/attr-isr-nosave_low_regs.c: Likewise. From-SVN: r110398
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 252f10c..0ac27c3 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2938,6 +2938,11 @@ case ${target} in
fi
;;
+ sh[123456ble]*-*-* | sh-*-*)
+ c_target_objs="${c_target_objs} sh-c.o"
+ cxx_target_objs="${cxx_target_objs} sh-c.o"
+ ;;
+
sparc*-*-*)
# Some standard aliases.
case x$with_cpu in