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]

MIPS bootstrap fix (Was":SUBREG related reload fix)


> Hello Jan,
> 
> 	mips-sgi-irix6.5 gcc 3.1 builds started failing in
> gcc/simplify-rtx.c's simplify_gen_subreg() this morning.  You seem to
> know the most about recent changes to this code.  Would you please
> investigate the difficulty?

Hi,
the failure is caused by bogus call of operand_subword with register and
mode as BLKmode.
The comment above function says, that mode is used in case operand is
CONST_INT, so I believe it makes sense to work around it inside
operand_subword, as fixing all callers seems to be involved and I would like to
slowly move to direct simplify_subreg calls instead.

Wed Jun  6 13:17:35 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* emit-rtl.c (operand_subword): Allow BLKmode on register for bogus
	callers.

Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.179
diff -c -3 -p -r1.179 emit-rtl.c
*** emit-rtl.c	2001/06/04 18:04:35	1.179
--- emit-rtl.c	2001/06/06 11:10:08
*************** operand_subword (op, offset, validate_ad
*** 1481,1486 ****
--- 1481,1493 ----
        return new;
      }
  
+   /* BLKmode mode makes sense only for memory operands.  To simplify some
+      callers, allow BLKmode on registers too.  This is the case for small
+      structures.  */
+ 
+   if (mode == BLKmode)
+     mode = GET_MODE (op);
+ 
    /* Rest can be handled by simplify_subreg.  */
    return simplify_gen_subreg (word_mode, op, mode, (offset * UNITS_PER_WORD));
  }


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