This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 3/3] MIPS/GAS: Correct note on the instruction count for the R5900 short loop fix
- From: Fredrik Noring <noring at nocrew dot org>
- To: "Maciej W. Rozycki" <macro at linux-mips dot org>, Chenghua Xu <paul dot hua dot gm at gmail dot com>, binutils at sourceware dot org
- Cc: Jürgen Urban <JuergenUrban at gmx dot de>
- Date: Sun, 30 Sep 2018 09:41:08 +0200
- Subject: [PATCH 3/3] MIPS/GAS: Correct note on the instruction count for the R5900 short loop fix
- References: <cover.1538299772.git.noring@nocrew.org>
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