[PATCH, ARM, RFC] Fix gfortran.dg/vector_subscript_1.f90 for -Os -mthumb reload ICE

Julian Brown julian@codesourcery.com
Fri May 2 10:15:00 GMT 2008


On Tue, 29 Apr 2008 21:56:23 +0100
Richard Sandiford <rsandifo@nildram.co.uk> wrote:

> Julian Brown <julian@codesourcery.com> writes:
> > The first thing to wonder is why a larger register class is not
> > chosen for that alternative: I think the reason is that
> > GENERAL_REGS (the likely contender) isn't a true union of the
> > LO_REGS and HI_REGS classes indicated by the 'l' and 'h' constraint
> > letters, because it has an extra register too, the soft frame
> > pointer:
> >
> > { 0x0200FFFF, 0x00000000, 0x00000000, 0x00000000 }, /* GENERAL_REGS
> > */
> >
> > So this patch adds a class which is the union of the HI_REGS and
> > LO_REGS classes, named HILO_REGS.
> 
> Yeah, I came across this problem before too, though not in a situation
> where I had to fix it.  FWIW, I think GENERAL_REGS really ought to be
> a union of HI_REGS and LO_REGS.  No target-independent code should
> rely on GENERAL_REGS including the soft frame pointer -- GENERAL_REGS
> doesn't include the soft fp on many other targets, including MIPS --
> so that shouldn't be an issue.  I can imagine some parts of the
> ARM backend use it as a shortcut, but it might be better to change
> those parts than introduce yet another class.

Interesting, thanks. Removing the soft frame pointer from GENERAL_REGS
(and still tweaking the constraint for -Os) fixes the problem too, and
doesn't appear to have any immediate ill effects -- but I'll need to
run more tests, etc. (on mainline) before submitting a patch which does
that.

Cheers,

Julian



More information about the Gcc-patches mailing list