On 03/06/2018 08:21 AM, Renlin Li wrote:
> Hi all,
> The problem described here probably only affects targets whose ABI allow
> to pass structured
> arguments of certain size via registers.
> If the mode of the parameter type is BLKmode, in the callee, during RTL
> expanding,
> a stack slot will be reserved for this parameter, and the incoming value
> will be copied into
> the stack slot.
> However, the stack slot for the parameter will not be aligned if the
> alignment of parameter type
> Chances are, unaligned memory access might cause run-time errors.
My recollection here (the PA has a ABI which mandates this kind of
stuff) is that you have to copy the object out of the potentially
unaligned location into a suitably aligned local.

The copy should be occurring in an alignment safe way.  It also has to
handle structures that are partially in registers, partially in memory
and structures which are justified in the wrong direction.

We never tried to optimize this stuff.  It was rare enough to not worry


Reply via email to