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 target/68507] attribute ms_abi (on Linux) bloats by pushing/popping xmm6-15 needlessly


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68507

--- Comment #4 from Daniel Santos <daniel.santos at pobox dot com> ---
According to  3.2.1 "Registers and the Stack Frame" of the System V
Application Binary Interface for AMD64

Registers %rbp, %rbx and %r12 through %r15 âbelongâ to the calling function and
the called function is required to preserve their values. In other words, a
called function must preserve these registersâ values for its caller. Remaining
registers âbelongâ to the called function.5 If a calling function wants to
preserve such a register value across a function call, it must save the value
in its local stack frame.

And for microsoft's "x64" calling convention
(https://msdn.microsoft.com/en-us/library/9z1stfyw.aspx), the xmm registers are
considered non-volatile, so it would appear that this is the correct behaviour,
barring some extensive whole-program analysis that can guarantee that the xmm
registers are not destroyed.

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