Keno Fischer via llvm-dev
2016-Jun-13 12:49 UTC
[llvm-dev] Semantics of preserve_all calling convention
The ir reference for preserve_all states: This calling convention also behaves identical to the Ccalling convention> on how arguments and return values are passedI tried the following: uint64_t return_zero() __attribute__((preserve_all)) { return 0; } and got 0000000000000020 <return_zero>: 20: 50 push %rax 21: 31 c0 xor %eax,%eax 23: 58 pop %rax 24: c3 retq as you can see, the rax register is restored to its value upon entry to the function and does not contain the return value. What are the semantics here? Should this work? Should we add a verifier error for functions with this calling convention that return values? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160613/9d19ade0/attachment.html>