Amanieu created this revision. Amanieu added a reviewer: MaskRay. Herald added subscribers: StephenFan, kristof.beyls. Herald added a project: All. Amanieu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
With -mgeneral-regs-only, all arguments are passed in GPRs, so we should use __gr_top/__gr_offs in va_list even for floating-point types. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D134717 Files: clang/lib/CodeGen/TargetInfo.cpp Index: clang/lib/CodeGen/TargetInfo.cpp =================================================================== --- clang/lib/CodeGen/TargetInfo.cpp +++ clang/lib/CodeGen/TargetInfo.cpp @@ -5988,7 +5988,8 @@ BaseTy = ArrTy->getElementType(); NumRegs = ArrTy->getNumElements(); } - bool IsFPR = BaseTy->isFloatingPointTy() || BaseTy->isVectorTy(); + bool IsFPR = CGF.getTarget().hasFeature("fp-armv8") && + (BaseTy->isFloatingPointTy() || BaseTy->isVectorTy()); // The AArch64 va_list type and handling is specified in the Procedure Call // Standard, section B.4:
Index: clang/lib/CodeGen/TargetInfo.cpp =================================================================== --- clang/lib/CodeGen/TargetInfo.cpp +++ clang/lib/CodeGen/TargetInfo.cpp @@ -5988,7 +5988,8 @@ BaseTy = ArrTy->getElementType(); NumRegs = ArrTy->getNumElements(); } - bool IsFPR = BaseTy->isFloatingPointTy() || BaseTy->isVectorTy(); + bool IsFPR = CGF.getTarget().hasFeature("fp-armv8") && + (BaseTy->isFloatingPointTy() || BaseTy->isVectorTy()); // The AArch64 va_list type and handling is specified in the Procedure Call // Standard, section B.4:
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits