All calling conventions should manage ESP explicitly. Typically, they
either preserve it, or use a callee-cleanup convention. There is no need
to push and pop ESP directly. Its inclusion appears to have been an
oversight.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
The document is correct, SP is preserved, but it's done by the standard SP adjustments, not by explicitly pushing and popping the SP register.
llvm/lib/Target/X86/X86CallingConv.td | ||
---|---|---|
1168 | Looks like that shows up in codegen as well. |
llvm/lib/Target/X86/X86CallingConv.td | ||
---|---|---|
1103 | I don't think that adds any clarification. RSP is preserved, just like you would expect of any regular, non callee-cleanup convention. |
LGTM.
llvm/lib/Target/X86/X86CallingConv.td | ||
---|---|---|
1103 | Yeah, you are right. I don't know what are these definition used for. Just saw it says all GPRs :-) |
except r11 and rsp?