From 9f8d69ee246583778c5eb61b430eb465477742f3 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Wed, 4 May 2011 10:42:59 +0000 Subject: [PATCH] 2011-05-04 Stuart Henderson From Jie Zhang * config/bfin/bfin.c (bfin_expand_prologue): Don't clobber P2. From-SVN: r173364 --- gcc/ChangeLog | 5 +++++ gcc/config/bfin/bfin.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f30c3113ac..3722fe5e6f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-04 Stuart Henderson + + From Jie Zhang + * config/bfin/bfin.c (bfin_expand_prologue): Don't clobber P2. + 2011-05-04 Nick Clifton * config/mn10300/mn10300.c: Include cfgloop.h. diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index e046789eec6..596042d139e 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -1341,8 +1341,10 @@ bfin_expand_prologue (void) = bfin_initial_elimination_offset (ARG_POINTER_REGNUM, STACK_POINTER_REGNUM); rtx lim = crtl->limit_stack ? stack_limit_rtx : NULL_RTX; + rtx tmp = gen_rtx_REG (Pmode, REG_R3); rtx p2reg = gen_rtx_REG (Pmode, REG_P2); + emit_move_insn (tmp, p2reg); if (!lim) { emit_move_insn (p2reg, gen_int_mode (0xFFB00000, SImode)); @@ -1379,6 +1381,7 @@ bfin_expand_prologue (void) } emit_insn (gen_compare_lt (bfin_cc_rtx, spreg, lim)); emit_insn (gen_trapifcc ()); + emit_move_insn (p2reg, tmp); } expand_prologue_reg_save (spreg, all, false); -- 2.30.2