aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2020-07-21 01:59:24 +0100
committerMaciej W. Rozycki <macro@linux-mips.org>2020-07-21 01:59:24 +0100
commitec4fcab0ee2877e2dd33528b2be34fa90c00e0b7 (patch)
treeabc4f9a0bdfa5e20d078b27dcace95d1c3d6cc10
parent3ce8f1ed68ff1dc02c2fca477d628f432294833a (diff)
downloadgdb-ec4fcab0ee2877e2dd33528b2be34fa90c00e0b7.zip
gdb-ec4fcab0ee2877e2dd33528b2be34fa90c00e0b7.tar.gz
gdb-ec4fcab0ee2877e2dd33528b2be34fa90c00e0b7.tar.bz2
MIPS/GAS: Remove stale `prev_reloc_op_frag' variable
Ever since commit 4d7206a284ee ("Rework MIPS macro relaxation, fix string merging bug"), <https://sourceware.org/ml/binutils/2004-01/msg00248.html>, `prev_reloc_op_frag' has only been set and never used. Remove it then. gas/ * config/tc-mips.c (prev_reloc_op_frag): Remove variable. (my_getSmallExpression): Adjust accordingly.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c13
2 files changed, 7 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2aed48f..38cbe1c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2020-07-21 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * config/tc-mips.c (prev_reloc_op_frag): Remove variable.
+ (my_getSmallExpression): Adjust accordingly.
+
2020-07-20 Jan Beulich <jbeulich@suse.com>
PR gas/4572
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 31acb77..2d85cb5 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -889,11 +889,6 @@ struct mips_hi_fixup
static struct mips_hi_fixup *mips_hi_fixup_list;
-/* The frag containing the last explicit relocation operator.
- Null if explicit relocations have not been used. */
-
-static fragS *prev_reloc_op_frag;
-
/* Map mips16 register numbers to normal MIPS register numbers. */
static const unsigned int mips16_to_32_reg_map[] =
@@ -14720,12 +14715,8 @@ my_getSmallExpression (expressionS *ep, bfd_reloc_code_real_type *reloc,
expr_end = str;
- if (reloc_index != 0)
- {
- prev_reloc_op_frag = frag_now;
- for (i = 0; i < reloc_index; i++)
- reloc[i] = reversed_reloc[reloc_index - 1 - i];
- }
+ for (i = 0; i < reloc_index; i++)
+ reloc[i] = reversed_reloc[reloc_index - 1 - i];
return reloc_index;
}