================
@@ -2595,6 +2595,14 @@ GetX86_64ByValArgumentPair(llvm::Type *Lo, llvm::Type 
*Hi,
 
 ABIArgInfo X86_64ABIInfo::
 classifyReturnType(QualType RetTy) const {
+  // return int128 as i128
+  if (const BuiltinType *BT = RetTy->getAs<BuiltinType>()) {
+    BuiltinType::Kind k = BT->getKind();
+    if (k == BuiltinType::Int128 || k == BuiltinType::UInt128) {
+      return ABIArgInfo::getDirect();
+    }
+  }
+
   // AMD64-ABI 3.2.3p4: Rule 1. Classify the return type with the
   // classification algorithm.
   X86_64ABIInfo::Class Lo, Hi;
----------------
T0b1-iOS wrote:

I changed GetINTEGERTypeAtOffset to return an i128 when appropriate. That also 
causes _BitInt(128) to be passed as an i128 but that should be fine as long as 
it doesn't change how it is passed on the stack.

https://github.com/llvm/llvm-project/pull/135230
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to