Fix PPC port

law@redhat.com law@redhat.com
Fri Jun 14 07:45:00 GMT 2002


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, 






More information about the Gcc-patches mailing list