[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns
Richard Townsend (Arm) via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 13:23:08 PDT 2019
richard.townsend.arm added a comment.
And with those modifications, everything seems to work correctly. I'd be fine with the LLVM portion landing at this stage, but one more rev and another test cycle for this patch would be ideal.
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1085
+ return true;
+ if (IsSizeGreaterThan128(RD))
+ return true;
----------------
So... to get the latest diff working, I had to remove this check...
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1096
+ bool isAArch64 = CGM.getTarget().getTriple().isAArch64();
+ bool isIndirectReturn = isAArch64 ?
+ (passClassIndirect(RD) || hasMicrosoftABIRestrictions(RD)) :
----------------
I also had to amend this to:
```bool isIndirectReturn = isAArch64 ?
(passClassIndirect(RD) || hasMicrosoftABIRestrictions(RD)
|| IsSizeGreaterThan128(RD)) :
!RD->isPOD();```
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1106
+
+ FI.getReturnInfo().setInReg(isAArch64 && !IsSizeGreaterThan128(RD));
----------------
... and also amend this to `FI.getReturnInfo().setInReg(isAArch64 && !(isAggregate && IsSizeGreaterThan128(RD)));`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60349/new/
https://reviews.llvm.org/D60349
More information about the cfe-commits
mailing list