[llvm] [M68k] add 32 bit branch instrs and relaxations (PR #117371)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 15:22:27 PST 2024
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 5cd6e21bddb882150068ea1c94e7b35c11f515be 8b2bd6052188983f8c63c1c124d65cae4a212e02 --extensions cpp -- llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp b/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp
index 170faebefe..fce673c2c5 100644
--- a/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp
+++ b/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp
@@ -63,23 +63,22 @@ public:
LLVM_DEBUG(dbgs() << "Fixup.getOffset(): " << Fixup.getOffset() << '\n');
LLVM_DEBUG(dbgs() << "Size: " << Size << '\n');
LLVM_DEBUG(dbgs() << "Data.size(): " << Data.size() << '\n');
- assert(Fixup.getOffset() + Size <= Data.size() && "Invalid fixup offset!");
+ assert(Fixup.getOffset() + Size <= Data.size() &&
+ "Invalid fixup offset!");
}
-
// Check that uppper bits are either all zeros or all ones.
// Specifically ignore overflow/underflow as long as the leakage is
// limited to the lower bits. This is to remain compatible with
// other assemblers.
- if(!isIntN(Size * 8 + 1, Value)) {
+ if (!isIntN(Size * 8 + 1, Value)) {
LLVM_DEBUG(dbgs() << "Fixup.getOffset(): " << Fixup.getOffset() << '\n');
LLVM_DEBUG(dbgs() << "Size: " << Size << '\n');
LLVM_DEBUG(dbgs() << "Data.size(): " << Data.size() << '\n');
LLVM_DEBUG(dbgs() << "Value: " << Value << '\n');
assert(isIntN(Size * 8 + 1, Value) &&
- "Value does not fit in the Fixup field");
+ "Value does not fit in the Fixup field");
}
-
// Write in Big Endian
for (unsigned i = 0; i != Size; ++i)
@@ -234,13 +233,15 @@ bool M68kAsmBackend::fixupNeedsRelaxation(const MCFixup &Fixup,
unsigned int KindLog2Size = getFixupKindLog2Size(Fixup.getKind());
bool FixupFieldTooSmall = false;
if (!isInt<8>(Value) && KindLog2Size == 0) {
- LLVM_DEBUG(dbgs() << "Needs relaxing, does not fit in 8 bits: " << Value << '\n');
+ LLVM_DEBUG(dbgs() << "Needs relaxing, does not fit in 8 bits: " << Value
+ << '\n');
FixupFieldTooSmall |= true;
} else if (!isInt<16>(Value) && KindLog2Size <= 1) {
- LLVM_DEBUG(dbgs() << "Needs relaxing, does not fit in 16 bits: " << Value << '\n');
+ LLVM_DEBUG(dbgs() << "Needs relaxing, does not fit in 16 bits: " << Value
+ << '\n');
FixupFieldTooSmall |= true;
}
-
+
return Value == 0 || FixupFieldTooSmall;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/117371
More information about the llvm-commits
mailing list