@@ -0,0 +1,396 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF
+// RUN: %clang_cc1 -triple
@@ -2028,6 +2032,10 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
, ArgList ,
}
}
+ if (Args.getLastArg(OPT_fcomplex_ppc_gnu_abi)) {
+Opts.setComplexInRegABI(CodeGenOptions::CMPLX_InGPR);
+ }
AaronBallman wrote:
```suggestion
if
@@ -0,0 +1,9 @@
+// RUN: %clang -c --target=ppc32 -fcomplex-ppc-gnu-abi %s 2>&1
AaronBallman wrote:
It'd be nice for this to check `-###` output to ensure that it's passing along
the correct `-cc1` option.
https://github.com/llvm/llvm-project/pull/77732
@@ -1654,6 +1654,10 @@ void CompilerInvocationBase::GenerateCodeGenArgs(const
CodeGenOptions ,
GenerateArg(Consumer, Opt);
}
+ if (T.isPPC32() && Opts.ComplexInRegABI == CodeGenOptions::CMPLX_InGPR) {
+GenerateArg(Consumer, OPT_fcomplex_ppc_gnu_abi);
+ }
+
https://github.com/AaronBallman commented:
I'm wondering why the GNU-compatible behavior is not on by default, especially
when in GNU mode (e.g., `-std=gnu17`)?
Also, the changes should come with a release note in
`clang/docs/ReleaseNotes.rst` so users know about the new functionality.
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Long5hot wrote:
ping!
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Long5hot wrote:
ping @chmeeedalf @daltenty @diggerlin @amy-kwan !!
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Long5hot wrote:
Ping!!
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Long5hot wrote:
ping!! @nemanjai
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin approved this pull request.
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
diggerlin wrote:
> @diggerlin ,
>
> > > can we implement -fcomplex-ppc-gnu-abi as "-msoft-float" ? what is your
> > > opinion ?
> > > that was not the intent here and we need to consultant ABI reference
> > > regrading the same ,before we decide on implementation .
I think I do not express
UmeshKalappa0 wrote:
@diggerlin ,
>>can we implement -fcomplex-ppc-gnu-abi as "-msoft-float" ? what is your
>>opinion ?
that was not the intent here and we need to consultant ABI reference regrading
the same ,before we decide on implementation .
diggerlin wrote:
I do not further comment on the PR,
but I have worry about that , the PR have different mechanism with
"-msoft-float" , the -msoft-float pass "use-soft-float"="true" in the IR, the
llc will l put float parameter in the GPR, but the PR implement
`-fcomplex-ppc-gnu-abi` in
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From cc5fe4a6aa4762040077ab39edb6677f42638673 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Sun, 28 Apr 2024 14:18:42 +0530
Subject: [PATCH 1/2] [clang][PowerPC] Add flag to enable compatibility with
GNU
@@ -0,0 +1,286 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
https://github.com/Long5hot deleted
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,286 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
diggerlin wrote:
please do not merge the commit if possible, merging the commit make the review
difficult, We want to compare what change between the two commit when we
review. otherwise we have review the patch from scratch.
https://github.com/llvm/llvm-project/pull/77732
@@ -0,0 +1,15 @@
+// RUN: not %clang %s --target=x86_64 -fcomplex-ppc-gnu-abi 2>&1 \
+// RUN: | FileCheck %s -check-prefix=X86_64
+// X86_64: error: unsupported option '-fcomplex-ppc-gnu-abi' for target
'x86_64'
+
+// RUN: not %clang %s --target=ppc64 -fcomplex-ppc-gnu-abi
@@ -0,0 +1,286 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
@@ -0,0 +1,286 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
@@ -0,0 +1,286 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
@@ -330,8 +330,12 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ // Size of GPR in bits.
+ static const unsigned RegLen = 32;
diggerlin wrote:
suggest change RegLen to GPRBits as
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From cc5fe4a6aa4762040077ab39edb6677f42638673 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Sun, 28 Apr 2024 14:18:42 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From 4cdfaf0a576d44a65484c61f5a572bed73ab0ce4 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Wed, 24 Apr 2024 19:06:23 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
@@ -0,0 +1,350 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From b5746d24130b9595762d85f4da7169d7b7a801f0 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Wed, 24 Apr 2024 18:01:23 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,350 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
@@ -5585,6 +5585,15 @@ void Clang::ConstructJob(Compilation , const JobAction
,
}
}
+ if (Arg *A = Args.getLastArg(options::OPT_fcomplex_ppc_gnu_abi)) {
+if (!TC.getTriple().isPPC32() || !TC.getTriple().isOSBinFormatELF()) {
+
@@ -396,12 +405,80 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
@@ -0,0 +1,350 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF
+//
@@ -396,12 +405,80 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From 3c5fcb03ee7871a93d3163beb51133c836f58ca6 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Thu, 28 Mar 2024 17:26:48 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -396,12 +405,85 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -396,12 +405,85 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -396,12 +405,85 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
@@ -421,6 +503,11 @@ ABIArgInfo PPC32_SVR4_ABIInfo::classifyReturnType(QualType
RetTy) const {
}
}
+ bool IsComplexInRegABI =
+ getCodeGenOpts().getComplexInRegABI() == CodeGenOptions::CMPLX_InGPR;
+ if (IsComplexInRegABI && RetTy->isAnyComplexType())
@@ -0,0 +1,306 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF
+// RUN: %clang_cc1 -triple
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From 81d57b415738e4cea8fbbade990046271cb505a5 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Tue, 26 Mar 2024 17:08:25 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From 59bd85681c590a5b3e259bfa93d87a80e5362878 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Tue, 26 Mar 2024 16:40:32 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From 618762c79f5ec1ea9a945b81e182e3d8e1046baf Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Tue, 26 Mar 2024 16:21:10 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/diggerlin deleted
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin deleted
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -396,12 +407,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
@@ -330,22 +330,33 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool IsComplexInRegABI;
diggerlin wrote:
do we need a new data member `IsComplexInRegABI` here ? (there are several
@@ -420,6 +496,10 @@ ABIArgInfo PPC32_SVR4_ABIInfo::classifyReturnType(QualType
RetTy) const {
return ABIArgInfo::getDirect(CoerceTy);
}
}
+ if (IsComplexInRegABI && RetTy->isAnyComplexType()) {
+assert(RetTy->isAnyComplexType() && "RetTy must be Complex
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,177 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF
+// RUN: %clang_cc1 -triple
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From ac3e5526189f5d9e2abe739a21394a63f75567b5 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Fri, 15 Mar 2024 15:29:41 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/Long5hot deleted
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,177 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF
+// RUN: %clang_cc1 -triple
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
@@ -271,22 +271,32 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool IsComplexInRegABI;
+ // Size of GPR in bits.
+ static const unsigned RegLen = 32;
+ static const int NumArgGPRs = 8;
@@ -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 ) const {
+
+
@@ -337,12 +347,58 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t ) const {
+ llvm::Type *ElemTy;
+ unsigned RegsNeeded; // Registers Needed for
@@ -271,22 +271,33 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool isComplexInRegABI;
+ // Size of GPR in bits
+ unsigned RLen;
+ static const int NumArgGPRs = 8;
CharUnits
@@ -271,22 +271,32 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool IsComplexInRegABI;
+ // Size of GPR in bits.
+ static const unsigned RegLen = 32;
+ static const int NumArgGPRs = 8;
@@ -78,6 +78,13 @@ class CodeGenOptions : public CodeGenOptionsBase {
SRCK_InRegs// Small structs in registers (-freg-struct-return).
};
+ enum ComplexArgumentConventionKind {
+CMPLX_Default,
+CMPLX_OnStack,
Long5hot wrote:
This was for
@@ -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 ) const {
+
+
@@ -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 ) const {
+
+
@@ -0,0 +1,177 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
+// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF
+// RUN: %clang_cc1 -triple
@@ -271,22 +271,33 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool isComplexInRegABI;
+ // Size of GPR in bits
+ unsigned RLen;
+ static const int NumArgGPRs = 8;
CharUnits
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From a89cd20615f3649e2a625eb8da851f9cbdd2d863 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Mon, 4 Mar 2024 18:04:20 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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 ) const {
+
+
@@ -0,0 +1,132 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+
+// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -target-cpu pwr8 \
diggerlin wrote:
do you really need `-target-cpu pwr8` since the
1 - 100 of 163 matches
Mail list logo