[PATCH] Remove MISALIGNED_INDIRECT_REF

Richard Guenther rguenther@suse.de
Thu Sep 30 18:03:00 GMT 2010


On Thu, 30 Sep 2010, Daniel Jacobowitz wrote:

> On Thu, Sep 30, 2010 at 03:11:47PM +0200, Eric Botcazou wrote:
> > > In experimenting with a STRICT_ALIGNMENT target, I noticed that
> > > the MEM rtx passed to the movmisalign expander sometimes has the
> > > default mode alignment, even though this is not true (that's why
> > > we need to use movmisalign in the first place).
> > 
> > But if you have movmisalign, why do you set STRICT_ALIGNMENT?  This seems to 
> > be the original contradiction.  You should use SLOW_UNALIGNED_ACCESS at most.
> 
> On ARM, for example, there are specific things that can be accessed
> "misaligned" - or at least with lower alignment requirements.  For
> instance, you can load V4SI with the alignment of SI.  But integer
> loads are still aligned only; this is a STRICT_ALIGNMENT target.

On x86_64, for example, there are specific things that can only
be accessed aligned in some contexts - like any SSE memory operand
in an instruction that is not an unaligned move.  x86_64 is not
a STRICT_ALIGNMENT target, but we at least now require that such
a target implements movmisalign.

I don't know if this is consistent with ARM, but I think that
maybe our documentation could use some clarification (eventually
with examples).

Richard.



More information about the Gcc-patches mailing list