On Wed, Oct 02, 2019 at 10:22:22PM +0100, Richard Sandiford wrote:
> My change to the -fipa-ra bookkeeping used ALL_REGS as the supposedly
> safe default assumption, but ALL_REGS isn't literally all registers,
> just a close approximation.
> 
> This caused a bootstrap failure on arm-linux-gnu, where the condition
> code register isn't in ALL_REGS and so was being masked out of some
> call-clobbered sets.

The documentation says

@findex ALL_REGS
@findex NO_REGS
In general, each register will belong to several classes.  In fact, one
class must be named @code{ALL_REGS} and contain all the registers.  Another
class must be named @code{NO_REGS} and contain no registers.  Often the
union of two classes will be another class; however, this is not required.

so is the arm port wrong, or is the documentation wrong?  I think the arm
port simply forgets to include CC_REG, VFPCC_REG, SFP_REG, AFP_REG:

#define REG_CLASS_CONTENTS                                              \
...
  { 0x00000000, 0x00000000, 0x00000000, 0x00000010 }, /* CC_REG */      \
  { 0x00000000, 0x00000000, 0x00000000, 0x00000020 }, /* VFPCC_REG */   \
  { 0x00000000, 0x00000000, 0x00000000, 0x00000040 }, /* SFP_REG */     \
  { 0x00000000, 0x00000000, 0x00000000, 0x00000080 }, /* AFP_REG */     \
  { 0xFFFF7FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000000F }  /* ALL_REGS */    \

and that last number should be 0x000000ff instead?



Segher

Reply via email to