This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gen_lowpart vs big endian insv
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 2 Jun 2006 20:30:12 -0400
- Subject: gen_lowpart vs big endian insv
h8300 has an HImode insv pattern. If you try to use it with an SImode
argument, expmed.c uses gen_lowpart to force it into the desired mode.
However, gen_lowpart eventually fails for pseudos on big endian:
rtx
gen_rtx_SUBREG (enum machine_mode mode, rtx reg, int offset)
{
gcc_assert (validate_subreg (mode, GET_MODE (reg), reg, offset));
return gen_rtx_raw_SUBREG (mode, reg, offset);
}
validate_subreg refuses to use a subreg to change the address of a
pseudo that could be in memory (i.e. SI->HI on big endian).
So... where is the bug or false assumption here? The test case is
h8300-elf vs gcc.dg/20040310-1.c with "-O1 -msx"
Thanks,
DJ