This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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(-)

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)
-- 
2.16.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]