[3/3] MIPS/GAS: Correct note on the instruction count for the R5900 short loop fix

Message ID 81d18f200bca9c797e8cf49cd028afd6112718c4.1538299772.git.noring@nocrew.org
State Superseded
Headers show
Series
  • MIPS/GAS: Extend the R5900 short loop fix test and notes
Related show

Commit Message

Fredrik Noring Sept. 30, 2018, 7:41 a.m.
The code applying the short loop fix, its test cases, and the original
note by Sony confirm that the correct instruction count including the
branch and the delay slot is six instructions or fewer.

This change amends the note in the code that (incorrectly) says that
the count is strictly less than six instructions.
---
 gas/config/tc-mips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.16.4

Patch

diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 684f2bdfa5..0e898dd2d3 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -7014,7 +7014,7 @@  can_swap_branch_p (struct mips_cl_insn *ip, expressionS *address_expr,
 	|| (ip->insn_opcode & 0xffff0000) == 0x04110000)) /* bgezal $0 */
     {
       int distance;
-      /* Check if loop is shorter than 6 instructions including
+      /* Check if loop is shorter than or equal to 6 instructions including
          branch and delay slot.  */
       distance = frag_now_fix () - S_GET_VALUE (address_expr->X_add_symbol);
       if (distance <= 20)