[patches] Re: GCC build failed for powerpc-eabisim with your patch on 2001-06-04T15:31:45Z.
Tue Jun 5 07:25:00 GMT 2001
> > So simple adding of offsets don't work. The checking code in
> > simplify_subreg refuses to construct the bogus subreg, that is why
> > the compiler aborts.
> Yes. The result would be wrong anyway, consider taking
we've constructed whole a bunch of incorrect subregs recently.
Most of code dealed with this bug by rounding back to multiple of the
outer_mode size. This is incorrect in some cases too, when we deal with
> (subreg:HI (subreg:QI (reg:DI) 3) 0)
> it should be
> (subreg:HI (reg:DI) 2)
> (subreg:HI (reg:DI) 3)
After my patching, it should work as follows - the subreg:QI is kept as it is,
the subreg:HI is discovered as paradoxical and difference should be added,
changing 3 to 2:
/* The SUBREG_BYTE represents offset, as if the value were stored
in memory. Irritating exception is paradoxical subreg, where
we define SUBREG_BYTE to be 0. On big endian machines, this
value should be negative. For a moment, undo this exception. */
if (byte == 0 && GET_MODE_SIZE (innermode) < GET_MODE_SIZE (outermode))
int difference = (GET_MODE_SIZE (innermode) - GET_MODE_SIZE (outermode));
final_offset += (difference / UNITS_PER_WORD) * UNITS_PER_WORD;
final_offset += difference % UNITS_PER_WORD;
difference is -1, so final_offset gets changed to 2.
Did you seen real example where the code in question fails currently?
I am nervous about the new failures...
> - Geoffrey Keating <firstname.lastname@example.org>
More information about the Gcc-regression