From db4af14ef35ab09be89e14a676bcc3e3ffc04e85 Mon Sep 17 00:00:00 2001 From: amacleod Date: Thu, 29 Oct 1998 11:21:20 +0000 Subject: Thu Oct 29 14:10:22 EST 1998 Andrew MacLeod * except.c (emit_eh_context): Make the EH context register stay alive at -O0 so stupid.c doesn't get confused. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23423 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/except.c | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1dbc93a050b..b01e4eaf058 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 29 14:10:22 EST 1998 Andrew MacLeod + + * except.c (emit_eh_context): Make the EH context register stay alive + at -O0 so stupid.c doesn't get confused. + 1998-10-29 Herman A.J. ten Brugge * emit-rtl.c (try_split): Do not try to split a BARRIER. diff --git a/gcc/except.c b/gcc/except.c index 867b4a5bdf6..d07d6bf0d40 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2094,6 +2094,14 @@ emit_eh_context () end_sequence (); emit_insns_before (insns, insn); + + /* At -O0, we must make the context register stay alive so + that the stupid.c register allocator doesn't get confused. */ + if (obey_regdecls != 0) + { + insns = gen_rtx_USE (GET_MODE (XEXP (reg,0)), XEXP (reg,0)); + emit_insn_before (insns, get_last_insn ()); + } } } } -- cgit v1.2.3