[PATCH] D105310: Mark SRet argument as pointer in SelectionDAGISel::LowerArguments
Harald van Dijk via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 3 07:07:44 PDT 2021
hvdijk added a comment.
In D105310#2856765 <https://reviews.llvm.org/D105310#2856765>, @pengfei wrote:
> I think the only thing X86 does for the pointer type is zero extend it to i64. So I think only x32 should be affected by it. Add @hvdijk who is familiar with x32 calling conversion.
That's right. The same registers are used regardless of whether the type is zero extended, i32 integers and i32 pointers are returned in the same 64-bit registers, the difference is whether the caller is responsible for clearing the high bits of those registers. According to the ABI the caller is responsible for that for all pointer arguments, no exception is made for the implicit pointer argument for return values that cannot be returned in registers, so I think this change is correct for x32.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105310/new/
https://reviews.llvm.org/D105310
More information about the llvm-commits
mailing list