[clang] [llvm] [Mips] Add r5900 (PlayStation 2 Emotion Engine) CPU support (PR #176666)
Rick Gaiser via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 27 01:10:07 PST 2026
================
@@ -278,6 +280,65 @@ static bool hasUnoccupiedSlot(const MachineInstr *MI) {
return MI->hasDelaySlot() && !MI->isBundledWithSucc();
}
+/// Check if a branch is a short backward loop that triggers the R5900 erratum.
+/// The erratum occurs when:
+/// - A loop has 6 or fewer instructions (including branch + delay slot)
----------------
rickgaiser wrote:
No, as far as I know the error wil only trigger when all conditions have been met:
- A loop has 6 or fewer instructions (including branch + delay slot)
- The branch is a conditional backward branch
- The delay slot is not NOP
- No other branches exist in the loop body
@frno7 can you confirm?
https://github.com/llvm/llvm-project/pull/176666
More information about the cfe-commits
mailing list