This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 20 May 2012 02:04:40 +0000
- Subject: [Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64
- Auto-submitted: auto-generated
- References: <bug-53383-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> 2012-05-20 02:04:40 UTC ---
(In reply to comment #10)
> The problem is va_args doing alignment based on stack pointer, i.e. in:
> int
>
> return va_arg (p, __int128);
> }
>
> addq $15, %rax
> andq $-16, %rax
This isn't necessary. If __int128 is put on stack by caller,
the stack must be aligned at 16 bytes.
> leaq 16(%rax), %rdx
> movq %rdx, -72(%rsp)
> movq (%rax), %rax
> ret
> .cfi_endproc
> .LFE0:
>
> this will get out of sync with hard coded offsets if rsp hapepns to be
> misaligned.
I don't think it will happen.