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

Reply via email to