[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

zhijian lin via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 22 08:25:49 PST 2024


================
@@ -337,12 +350,77 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
   return CharUnits::fromQuantity(4);
 }
 
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+                                             uint64_t &TypeSize) const {
+
+  assert(Ty->isAnyComplexType());
+  llvm::Type *ElemTy;
+  unsigned SizeRegs;
+
+  if (TypeSize == 64) {
+    ElemTy = llvm::Type::getInt64Ty(getVMContext());
+    SizeRegs = 1;
+  } else {
+    ElemTy = llvm::Type::getInt32Ty(getVMContext());
----------------
diggerlin wrote:

I am curiously , why not get ElemTy = llvm::Type::getInt128Ty(getVMContext()); instead of ElemTy = llvm::Type::getInt32Ty(getVMContext());

https://github.com/llvm/llvm-project/pull/77732


More information about the cfe-commits mailing list