[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)
Amjad Aboud via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 7 04:08:22 PDT 2016
aaboud marked 3 inline comments as done.
aaboud added a comment.
In https://reviews.llvm.org/D22045#506996, @joerg wrote:
> For what it is worth, this certainly seems to be misnamed. By nature, if it doesn't preserve at least the stack pointer, there is no way to recover on return, right?
I am not sure I understand what you mean!
When you said "if it does not preserve the stack pointer", did you mean the "caller"?
Maybe it need more clarification on that, but stack pointer should be saved by the caller (via the call instruction), but even in this case the callee must preserve the stack pointer, right? otherwise the return will not work. So, from callee point of view it still cannot assume that any register is a scratch register and it need to preserve it before modifying.
More information about the cfe-commits