[PATCH] Improve alloca alignment
Jeff Law
law@redhat.com
Thu Oct 26 14:55:00 GMT 2017
On 10/05/2017 03:16 AM, Richard Biener wrote:
> On Thu, Oct 5, 2017 at 1:07 AM, Jeff Law <law@redhat.com> wrote:
>> On 10/04/2017 08:53 AM, Eric Botcazou wrote:
>>>> This seems like a SPARC target problem to me -- essentially it's
>>>> claiming a higher STACK_BOUNDARY than it really has.
>>>
>>> No, it is not, I can guarantee you that the stack pointer is always aligned to
>>> 64-bit boundaries on SPARC, otherwise all hell would break loose...
>> Then something is inconsistent somehwere. Either the stack is aligned
>> prior to that code or it is not. If it is aligned, then Wilco's patch
>> ought to keep it aligned. If is not properly aligned, then well, that's
>> the problem ISTM.
>>
>> Am I missing something here?
>
> What I got from the discussion and the PR is that the stack hardregister
> is properly aligned but what GCC maps to it (virtual or frame or whatever)
> might not be at all points.
Ah! But I'd probably claim that having the virtual unaligned is erroneous.
>
> allocate_dynamic_stack_space uses virtual_stack_dynamic_rtx and I'm not
> sure STACK_BOUNDARY applies to it?
>
> Not that I know anything about this here ;)
My first thought is that sure it should apply. It just seems wrong that
STACK_BOUNDARY wouldn't apply to the virtual. But I doubt we've ever
documented that as a requirement/assumption.
Jeff
More information about the Gcc-patches
mailing list