[PATCH] D141020: [X86][ABI] Clobber %RAX for preserve_allcc and preserve_mostcc CCs
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 17:19:56 PST 2023
efriedma added a comment.
Having a register be both preserved and used to store a return value is obviously a contradiction. However, it's consistent to say that a register is preserved if and only if it is not used to return a value. (Not sure off the top of my head what changes are required to make that work correctly.)
The C calling convention uses RAX/RDX/XMM0/XMM1 to return values, and LLVM additionally allows using RCX/XMM2/XMM3 for certain IR signatures. So I don't think just removing RAX from the list does the right thing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141020/new/
https://reviews.llvm.org/D141020
More information about the llvm-commits
mailing list