[clang] [Sparc] don't pass varargs in float registers (PR #216524)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 15 17:27:46 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,c -- clang/test/CodeGen/Sparc/variadic-aggregate.c clang/lib/CodeGen/Targets/Sparc.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CodeGen/Targets/Sparc.cpp b/clang/lib/CodeGen/Targets/Sparc.cpp
index ed9decb8d..9d8280ad2 100644
--- a/clang/lib/CodeGen/Targets/Sparc.cpp
+++ b/clang/lib/CodeGen/Targets/Sparc.cpp
@@ -187,8 +187,9 @@ private:
bool InReg;
bool IsVarArg;
- CoerceBuilder(llvm::LLVMContext &c, const llvm::DataLayout &dl, bool IsVarArg)
- : Context(c), DL(dl), Size(0), InReg(false), IsVarArg(IsVarArg) {}
+ CoerceBuilder(llvm::LLVMContext &c, const llvm::DataLayout &dl,
+ bool IsVarArg)
+ : Context(c), DL(dl), Size(0), InReg(false), IsVarArg(IsVarArg) {}
// Pad Elems with integers until Size is ToSize.
void pad(uint64_t ToSize) {
@@ -281,7 +282,8 @@ private:
} // end anonymous namespace
ABIArgInfo SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit,
- unsigned &RegOffset, bool IsVarArg) const {
+ unsigned &RegOffset,
+ bool IsVarArg) const {
if (Ty->isVoidType())
return ABIArgInfo::getIgnore();
@@ -410,7 +412,8 @@ RValue SparcV9ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
void SparcV9ABIInfo::computeInfo(CGFunctionInfo &FI) const {
unsigned RetOffset = 0;
- ABIArgInfo RetType = classifyType(FI.getReturnType(), 32 * 8, RetOffset, /*IsVarArg=*/false);
+ ABIArgInfo RetType =
+ classifyType(FI.getReturnType(), 32 * 8, RetOffset, /*IsVarArg=*/false);
FI.getReturnInfo() = RetType;
// Indirect returns will have its pointer passed as an argument.
``````````
</details>
https://github.com/llvm/llvm-project/pull/216524
More information about the cfe-commits
mailing list