diff options
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index a98e409..64240b1 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -5051,6 +5051,11 @@ CharUnits PPC64_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(16); } else if (Ty->isVectorType()) { return CharUnits::fromQuantity(getContext().getTypeSize(Ty) == 128 ? 16 : 8); + } else if (Ty->isRealFloatingType() && getContext().getTypeSize(Ty) == 128) { + // IEEE 128-bit floating numbers are also stored in vector registers. + // And both IEEE quad-precision and IBM extended double (ppc_fp128) should + // be quad-word aligned. + return CharUnits::fromQuantity(16); } // For single-element float/vector structs, we consider the whole type |