This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

regrename thinko


Primarily that not every target defines PIC_OFFSET_TABLE_REGNUM,
but secondarily that that is merely a special case of what we 
ought to be testing -- don't use fixed registers.


r~

        * regrename.c (consider_available): Test fixed_regs not
        PIC_OFFSET_TABLE_REGNUM.

Index: regrename.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/regrename.c,v
retrieving revision 1.1
diff -c -p -d -r1.1 regrename.c
*** regrename.c	2000/04/05 00:32:45	1.1
--- regrename.c	2000/04/05 01:22:25
*************** consider_available (reg_use, avail_reg, 
*** 776,781 ****
--- 776,784 ----
    if (!TEST_HARD_REG_BIT (*avail_regs, avail_reg))
      return 0;
  
+   if (fixed_regs[avail_reg])
+     return 0;
+ 
  #ifdef HARD_REGNO_RENAME_OK
    if (!HARD_REGNO_RENAME_OK (REGNO (reg_use), avail_reg))
      return 0;
*************** consider_available (reg_use, avail_reg, 
*** 810,818 ****
    /* If register is a callee-saved register it must be saved in the frame. 
       call saved registers can not be added to regs_ever_live after reload,
       as it would invalidate most elimination offsets */
!   if (regs_ever_live[avail_reg] || call_used_regs[avail_reg]
!       || (avail_reg == PIC_OFFSET_TABLE_REGNUM
! 	  && flag_pic && (current_function_uses_pic_offset_table)))
      return 1;
  
    return 0;
--- 813,819 ----
    /* If register is a callee-saved register it must be saved in the frame. 
       call saved registers can not be added to regs_ever_live after reload,
       as it would invalidate most elimination offsets */
!   if (regs_ever_live[avail_reg] || call_used_regs[avail_reg])
      return 1;
  
    return 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]