[clang] [compiler-rt] [llvm] [WIP][SPARC] Properly handle CC for long double on sparc32 (PR #162226)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 15:51:36 PDT 2025


================
@@ -26,19 +26,51 @@ class SparcV8ABIInfo : public DefaultABIInfo {
 
 private:
   ABIArgInfo classifyReturnType(QualType RetTy) const;
+  ABIArgInfo classifyArgumentType(QualType Ty) const;
   void computeInfo(CGFunctionInfo &FI) const override;
 };
 } // end anonymous namespace
 
 
 ABIArgInfo
 SparcV8ABIInfo::classifyReturnType(QualType Ty) const {
+  const BuiltinType *BT = Ty->getAs<BuiltinType>();
+  bool IsF128 = false;
+
+  if (Ty->isRealFloatingType() && getContext().getTypeSize(Ty) == 128)
+    IsF128 = true;
+
+  // FIXME not sure if redundant
+  if (BT && BT->getKind() == BuiltinType::LongDouble)
+    IsF128 = true;
----------------
efriedma-quic wrote:

Yes, this looks redundant.  isRealFloatingType() checks basically the same thing.

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


More information about the cfe-commits mailing list