This is the mail archive of the gcc@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]

Re: [PATCH] New style SUBREGs, PLEASE PLEASE testme


   From: N8TM@aol.com
   Date: Tue, 6 Oct 1998 02:03:29 EDT

   Applying this patch to gcc-19980921 on i686-pc-cygwin32 gives the following
   final remark:

   _muldi3
   gcc/reload.c:1748: ICE in function find_dummy_reload

Thanks, this is what the testing is for.  Please add the following fix
to the subreg patches and it should be just fine.

--- reload.c.~2~	Tue Oct  6 04:20:16 1998
+++ reload.c	Tue Oct  6 04:47:09 1998
@@ -1739,21 +1739,28 @@
 	  || GET_MODE_SIZE (inmode) > UNITS_PER_WORD))
     return 0;
 
+  /* Note that {in,out}_offset are needed only when 'in' or 'out'
+     respectively refers to a hard register.  */
+
   /* Find the inside of any subregs.  */
   while (GET_CODE (out) == SUBREG)
     {
-      out_offset = SUBREG_REGNO_OFFSET (REGNO (SUBREG_REG (out)),
-					GET_MODE (SUBREG_REG (out)),
-					SUBREG_BYTE (out),
-					GET_MODE (out));
+      if (GET_CODE (SUBREG_REG (out)) == REG
+	  && REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER)
+	out_offset += SUBREG_REGNO_OFFSET (REGNO (SUBREG_REG (out)),
+					   GET_MODE (SUBREG_REG (out)),
+					   SUBREG_BYTE (out),
+					   GET_MODE (out));
       out = SUBREG_REG (out);
     }
   while (GET_CODE (in) == SUBREG)
     {
-      in_offset = SUBREG_REGNO_OFFSET (REGNO (SUBREG_REG (in)),
-				       GET_MODE (SUBREG_REG (in)),
-				       SUBREG_BYTE (in),
-				       GET_MODE (in));
+      if (GET_CODE (SUBREG_REG (in)) == REG
+	  && REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER)
+	in_offset += SUBREG_REGNO_OFFSET (REGNO (SUBREG_REG (in)),
+					  GET_MODE (SUBREG_REG (in)),
+					  SUBREG_BYTE (in),
+					  GET_MODE (in));
       in = SUBREG_REG (in);
     }
 


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