This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping: [patch] -m128bit-long-double asserts
Hi Stuart,
If you look at subreg_offset_representable_p, you'll see that indeed
it does not work properly if the assert does not hold. For instance,
suppose
ymode == SImode (size 4)
xmode == XCmode (size 32)
nregs_xmode == 6
nregs_ymode == 1
offset == 3 + 12
so
y_offset = 3
mode_multiple = 8
nregs_multiple = 6
You'll see that in fact this is not representable, because there is no
register which actually holds that word, but the routine will
incorrectly return true, saying that it is representable. I expect
that subreg_regno_offset will fail for many cases where the offset
actually is representable.
Thus, in order to remove that 'assert', you'd have to modify both
subreg_offset_representable_p and subreg_regno_offset to deal with
such cases correctly. There are probably other bugs you'd find too.
This takes me to the second patch, which seems correct as far as it
goes, but needs the corresponding change to XCmode, to prevent exactly
the case above.