ostannard requested changes to this revision. ostannard added a comment. This revision now requires changes to proceed.
The document you linked in the LLVM change (https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#return-values) says that small POD types are returned directly in X0 or X0 and X1, but this looks like it will always return them indirectly. I think we also need to check the size of the type, and fall back the the plain C ABI for small types. ================ Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1060 + // Note: The "inreg" attribute is used to signal that the struct return + // should be in X0. + bool sretInX0 = (CGM.getTarget().getTriple().getArch() == ---------------- Nit: this will use X1 for functions with a this parameter, not X0. ================ Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1062 + bool sretInX0 = (CGM.getTarget().getTriple().getArch() == + llvm::Triple::aarch64) && !RD->isPOD(); + ---------------- This should also check aarch64_be. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits