SHUCAI YAO via llvm-dev
2016-Aug-08 19:23 UTC
[llvm-dev] How to modify the calling convention
I'm trying to implement something similar to this: http://gcc.gnu.org/wiki/ SplitStacks in LLVM. What I'm hoping to do is to be able to inject the following code (in x86 asm, callee clean-up calling convention): for each function call: lea %foo_return, %eax mov %eax, [%esp - calleestackframesize] push arg1 push arg2 push ... jmp foo foo_return: ... The problem I have is how to force the LLVM to generates the previous code. How could I modify the calling sequence? Any suggestions are appreciated. Thanks! Shucai -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160808/9d872b3f/attachment.html>