aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2005-04-14 15:32:58 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2005-04-14 15:32:58 +0000
commit39a59cf89e244653b01173f6d4b04ae7b746059d (patch)
tree763330755a16ad569a1914c748a25002f19aff4a /gas
parent2f041bf7ed0432c9588ee5088f00e73ddbf90b28 (diff)
downloadgdb-39a59cf89e244653b01173f6d4b04ae7b746059d.zip
gdb-39a59cf89e244653b01173f6d4b04ae7b746059d.tar.gz
gdb-39a59cf89e244653b01173f6d4b04ae7b746059d.tar.bz2
* config/tc-mips.c (macro) [ldd_std]: Don't attempt the GP
optimization for constant addresses.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index deab89a..1ea7d3d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-14 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * config/tc-mips.c (macro) [ldd_std]: Don't attempt the GP
+ optimization for constant addresses.
+
2005-04-14 Nick Clifton <nickc@redhat.com>
* as.c (main): Move parse_args before symbol_begin and frag_init
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index a13b06e..19e8f90 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -6417,7 +6417,8 @@ macro (struct mips_cl_insn *ip)
If there is a base register, we add it to $at after the
lui instruction. If there is a constant, we always use
the last case. */
- if ((valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
+ if (offset_expr.X_op == O_symbol
+ && (valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
&& !nopic_need_relax (offset_expr.X_add_symbol, 1))
{
relax_start (offset_expr.X_add_symbol);