This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/56165] Missed optimization for 'noreturn' functions
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 03 Feb 2013 09:07:57 +0000
- Subject: [Bug target/56165] Missed optimization for 'noreturn' functions
- Auto-submitted: auto-generated
- References: <bug-56165-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56165
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-03 09:07:57 UTC ---
(In reply to comment #9)
> 1) I agree for "push rbx" seves reg. But "sub rsp,8" is completely trash,
> because stack frame do not used at all, not for save reg, nor anything other.
You're wrong. That is to maintain the ABI, which for x86_64 says that the
stack is 16-byte aligned. Consider e.g. the noreturn function using SSE
instructions, without that subq $8, %rsp the stack in the noreturn function
would be not properly aligned to 16-bytes and any movdqa and similar insns on
stack slots would crash.