On 22/09/16 15:27, Alexander Monakov wrote:
On Thu, 22 Sep 2016, Kyrill Tkachov wrote:
In the the interest of fixing arm bootstrap here are the two blocking issues
and the changes proposed for them.
I'm not familiar enough with regrename or sel-sched to make a call on whether
these are right or not, I just want to keep the ball rolling so we can fix
arm bootstrap.

These changes allowed arm bootstrap to complete.
Are they the right way to go?
If so, I'll do a full bootstrap and test run on aarch64 and x86_64.

Thanks,
Kyrill

2016-09-22  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
             Bernd Edlinger  <bernd.edlin...@hotmail.de>
             Bernd Schmidt  <bschm...@redhat.com>

     * regrename.c (rename_chains): Avoid using HARD_FRAME_POINTER_REGNUM
     in a boolean context.
     * sel-sched.c (mark_unavailable_hard_regs): Likewise.
This doesn't look right to me. Note that you're patching uses of
H_F_P_IS_FRAME_POINTER (the ChangeLog is wrong).  As I understand, the issue is
that config/arm/arm.h defines that to plain 0, which causes the warning (ugh?).

Does the following restore bootstrap?

Thanks.
Alexander

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 373dc85..1ae82c1 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -887,8 +887,8 @@ extern int arm_arch_crc;
     ? ARM_HARD_FRAME_POINTER_REGNUM             \
     : THUMB_HARD_FRAME_POINTER_REGNUM)

-#define HARD_FRAME_POINTER_IS_FRAME_POINTER 0
-#define HARD_FRAME_POINTER_IS_ARG_POINTER 0
+#define HARD_FRAME_POINTER_IS_FRAME_POINTER false
+#define HARD_FRAME_POINTER_IS_ARG_POINTER false

Sorry no, the problem is HARD_FRAME_POINTER_REGNUM that is defined as:
#define HARD_FRAME_POINTER_REGNUM        \
  (TARGET_ARM                    \
   ? ARM_HARD_FRAME_POINTER_REGNUM        \
   : THUMB_HARD_FRAME_POINTER_REGNUM)

where ARM_HARD_FRAME_POINTER_REGNUM is 11 and THUMB_HARD_FRAME_POINTER_REGNUM 
is 7
so Bernd's new warning triggers whenever HARD_FRAME_POINTER_REGNUM is used as a
boolean like it is in sel-sched.c and regrename.c


  #define FP_REGNUM                      HARD_FRAME_POINTER_REGNUM



Reply via email to