3.2 powerpc ICE fix

Alan Modra amodra@bigpond.net.au
Wed Apr 2 00:48:00 GMT 2003


I'd like to apply this patch to the 3.2 branch.  Fixes an ICE when
-mpowerpc64 is used with a 32-bit compiler.  Trawling through changelogs
reveals that Aldy fixed this on mainline with his 2002-07-24 commit.

	* config/rs6000/rs6000.c (rs6000_emit_prologue): Use correct mode to
	set frame pointer.

diff -urpN -xCVS -x'*~' -x'*.info*' -x'*.[17]' -xTAGS gcc-ppc64-32.orig/gcc/config/rs6000/rs6000.c gcc-ppc64-32/gcc/config/rs6000/rs6000.c
--- gcc-ppc64-32.orig/gcc/config/rs6000/rs6000.c	2003-03-19 12:03:44.000000000 +1030
+++ gcc-ppc64-32/gcc/config/rs6000/rs6000.c	2003-04-01 15:25:49.000000000 +0930
@@ -8898,7 +8898,7 @@ rs6000_emit_prologue ()
   /* Set frame pointer, if needed.  */
   if (frame_pointer_needed)
     {
-      insn = emit_move_insn (gen_rtx_REG (reg_mode, FRAME_POINTER_REGNUM), 
+      insn = emit_move_insn (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),
 			     sp_reg_rtx);
       RTX_FRAME_RELATED_P (insn) = 1;
     }

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Gcc-patches mailing list