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]
Other format: [Raw text]

Fix PPC port


The patch to automatically share some hard registers broke the PPC port which
assumed that identical hard regs could not be shared in its code to twiddle
notes on frame related insns.

This patch fixes the problem and brings the PPC back to bootstrapping.  
Regression tests are still running, but given the fact that the PPC hasn't
bootstrapped since yesterday, I'm going to go ahead and get this checked in.

	* rs6000.c (rs6000_frame_related): Avoid unwanted sharing
	of hard registers.

Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.331
diff -c -3 -p -r1.331 rs6000.c
*** rs6000.c	12 Jun 2002 00:27:03 -0000	1.331
--- rs6000.c	14 Jun 2002 14:41:25 -0000
*************** rs6000_frame_related (insn, reg, val, re
*** 8666,8671 ****
--- 8666,8679 ----
  {
    rtx real, temp;
  
+   /* copy_rtx will not make unique copies of registers, so we need to
+      ensure we don't have unwanted sharing here.  */
+   if (reg == reg2)
+     reg = gen_raw_REG (GET_MODE (reg), REGNO (reg));
+ 
+   if (reg == rreg)
+     reg = gen_raw_REG (GET_MODE (reg), REGNO (reg));
+ 
    real = copy_rtx (PATTERN (insn));
  
    real = replace_rtx (real, reg, 





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