This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
MIPS bootstrap fix (Was":SUBREG related reload fix)
- To: Jeffrey Oldham <oldham at codesourcery dot com>
- Subject: MIPS bootstrap fix (Was":SUBREG related reload fix)
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 6 Jun 2001 13:21:20 +0200
- Cc: jh at suse dot cz, gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, kenner at vlsi1 dot ultra dot nyu dot edu
- References: <20010605091247.A7113@codesourcery.com>
> 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));
}