This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/67856] callee-saved register saves should be shrink-wrapped


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]