From 7a46491380a94b817c90052503ff98661a0b64da Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 10 Jul 2002 12:26:59 -0600 Subject: [PATCH] mn10200.c (expand_prologue): Create REG_MAYBE_DEAD notes as appropriate. * mn10200.c (expand_prologue): Create REG_MAYBE_DEAD notes as appropriate. From-SVN: r55373 --- gcc/ChangeLog | 3 +++ gcc/config/mn10200/mn10200.c | 20 +++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db0924d..2db2b0c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -4,6 +4,9 @@ Wed Jul 10 18:48:55 CEST 2002 Jan Hubicka 2002-07-10 Jeffrey A Law + * mn10200.c (expand_prologue): Create REG_MAYBE_DEAD notes + as appropriate. + * mn10200.c (expand_epilogue): Fix test to determine which scratch register to use. diff --git a/gcc/config/mn10200/mn10200.c b/gcc/config/mn10200/mn10200.c index e9f34b8..66ee9ad 100644 --- a/gcc/config/mn10200/mn10200.c +++ b/gcc/config/mn10200/mn10200.c @@ -690,13 +690,23 @@ expand_prologue () } /* Now put the static chain back where the rest of the function - expects to find it. */ + expects to find it. + + Note that we may eliminate all references to this later, so we + mark the static chain as maybe dead. */ if (current_function_needs_context) { - emit_move_insn (gen_rtx_REG (PSImode, STATIC_CHAIN_REGNUM), - gen_rtx (MEM, PSImode, - gen_rtx_PLUS (PSImode, stack_pointer_rtx, - GEN_INT (size)))); + rtx insn; + + insn = emit_move_insn (gen_rtx_REG (PSImode, STATIC_CHAIN_REGNUM), + gen_rtx (MEM, PSImode, + gen_rtx_PLUS (PSImode, + stack_pointer_rtx, + GEN_INT (size)))); + REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, + const0_rtx, + REG_NOTES (insn)); + } } -- 2.7.4