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 R5900 instruction count 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: Thu, 11 Oct 2018 18:26:28 +0200
- Subject: [PATCH 3/3] MIPS/GAS: Correct note on the R5900 instruction count short loop fix
- References: <cover.1539274600.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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index cab1c4c6c8..918525b4e9 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -7014,8 +7014,8 @@ 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
- branch and delay slot. */
+ /* 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