From a943bb7fcd9e251ee4192478561cea62ab54a7d8 Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Mon, 26 Sep 2016 14:52:03 +0000 Subject: [PATCH] [regrename][sel-sched] Fix bogus use of HARD_FRAME_POINTER_REGNUM (was: Fix arm bootstrap) * regrename.c (rename_chains): Check HARD_FRAME_POINTER_IS_FRAME_POINTER rather than HARD_FRAME_POINTER_REGNUM when picking unavailable registers. * sel-sched.c (mark_unavailable_hard_regs): Likewise. Co-Authored-By: Alexander Monakov From-SVN: r240496 --- gcc/ChangeLog | 8 ++++++++ gcc/regrename.c | 2 +- gcc/sel-sched.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bdebe60f828..707b55f2306 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-09-26 Kyrylo Tkachov + Alexander Monakov + + * regrename.c (rename_chains): Check + HARD_FRAME_POINTER_IS_FRAME_POINTER rather than + HARD_FRAME_POINTER_REGNUM when picking unavailable registers. + * sel-sched.c (mark_unavailable_hard_regs): Likewise. + 2016-09-26 Andreas Krebbel * config/s390/s390.c (s390_rtx_costs): Add /* fallthrough */. diff --git a/gcc/regrename.c b/gcc/regrename.c index 54c7768efa2..3509e8bab81 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -481,7 +481,7 @@ rename_chains (void) if (fixed_regs[reg] || global_regs[reg] || (!HARD_FRAME_POINTER_IS_FRAME_POINTER && frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM) - || (HARD_FRAME_POINTER_REGNUM && frame_pointer_needed + || (HARD_FRAME_POINTER_IS_FRAME_POINTER && frame_pointer_needed && reg == FRAME_POINTER_REGNUM)) continue; diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 1ed0d4bdca6..2968bdfe797 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -1185,7 +1185,7 @@ mark_unavailable_hard_regs (def_t def, struct reg_rename *reg_rename_p, || global_regs[regno] || (!HARD_FRAME_POINTER_IS_FRAME_POINTER && frame_pointer_needed && regno == HARD_FRAME_POINTER_REGNUM) - || (HARD_FRAME_POINTER_REGNUM && frame_pointer_needed + || (HARD_FRAME_POINTER_IS_FRAME_POINTER && frame_pointer_needed && regno == FRAME_POINTER_REGNUM) || (reload_completed && cl == NO_REGS)) { -- 2.30.2