This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/67856] callee-saved register saves should be shrink-wrapped
- From: "luto at mit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Oct 2015 00:57:12 +0000
- Subject: [Bug rtl-optimization/67856] callee-saved register saves should be shrink-wrapped
- Auto-submitted: auto-generated
- References: <bug-67856-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67856
--- Comment #2 from Andy Lutomirski <luto at mit dot edu> ---
(In reply to Segher Boessenkool from comment #1)
> The call to "a" needs the prologue, maybe to align the stack?
The "subq $8, %rsp" is for stack alignment, and whether it's emitted depends on
the parity of the number of pushes. I have no problem with it.
The problem is that rbx and rbp are pushed. They shouldn't be. In a real
function, it's worse: rbx, rbp, r12, r13, r14, and r15 all get pushed
unnecessarily. I just had a bunch of fun refactoring my big Linux entry code
rewrite to minimize the amount of pain that this issue causes.