[llvm] [Mips] Emit 16-bit microMIPS NOPs for alignment (PR #228879)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 05:39:35 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 -- llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.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/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
index 500dedaf0..71069722a 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
@@ -585,8 +585,9 @@ MCFixupKindInfo MipsAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
bool MipsAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count,
const MCSubtargetInfo *STI) const {
// We mostly follow binutils' convention here: align to an even boundary with
- // zero-fill padding, then emit up to one 2-byte NOP. Use move $zero, $zero for
- // microMIPS, or zero-fill for standard MIPS. Pad the remainder with 4-byte NOPs.
+ // zero-fill padding, then emit up to one 2-byte NOP. Use move $zero, $zero
+ // for microMIPS, or zero-fill for standard MIPS. Pad the remainder with
+ // 4-byte NOPs.
// An odd byte is data padding. Align to an instruction boundary first.
if (Count % 2) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/228879
More information about the llvm-commits
mailing list