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

Jeffrey Oldham oldham@codesourcery.com
Wed Jun 6 08:48:00 GMT 2001


On Wed, Jun 06, 2001 at 01:21:20PM +0200, Jan Hubicka wrote:
> > 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.

Great!  With the patch, a mips-sgi-irix6.5 cross compiler compiles
genrecog.i.  Would you please bootstrap and test using the patch on
your favorite platform, ask someone for patch approval, and then
commit it?  I hope to have a successful Irix gcc 3.1 bootstrap
tomorrow morning.

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com

> 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));
>   }

-- 
Jeffrey D. Oldham
oldham@codesourcery.com



More information about the Gcc-patches mailing list