aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-02-06 01:24:17 +0000
committerAlan Modra <amodra@gmail.com>2003-02-06 01:24:17 +0000
commit5f6db75ada83d0ff7f74739da164132215ba359c (patch)
treebe0425a4be7e3eb587737280c79715c5de617b09 /gas
parentcbf1e085053bbddeaa9f14f1e42b1dd4819d5abc (diff)
downloadgdb-5f6db75ada83d0ff7f74739da164132215ba359c.zip
gdb-5f6db75ada83d0ff7f74739da164132215ba359c.tar.gz
gdb-5f6db75ada83d0ff7f74739da164132215ba359c.tar.bz2
* config/tc-ppc.c (ppc_elf_suffix): Undo part of last change so that
x@toc+off works.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ppc.c42
2 files changed, 25 insertions, 22 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 82d1072..58f3165 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-06 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Undo part of last change so that
+ x@toc+off works.
+
2003-02-05 Alan Modra <amodra@bigpond.net.au>
* config/tc-ppc.c (mapping): Handle new TLS reloc specs.
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 56af40a..293627e 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -1580,31 +1580,29 @@ ppc_elf_suffix (str_p, exp_p)
}
if (!ppc_obj64)
+ if (exp_p->X_add_number != 0
+ && (reloc == (int) BFD_RELOC_16_GOTOFF
+ || reloc == (int) BFD_RELOC_LO16_GOTOFF
+ || reloc == (int) BFD_RELOC_HI16_GOTOFF
+ || reloc == (int) BFD_RELOC_HI16_S_GOTOFF))
+ as_warn (_("identifier+constant@got means identifier@got+constant"));
+
+ /* Now check for identifier@suffix+constant. */
+ if (*str == '-' || *str == '+')
{
- if (exp_p->X_add_number != 0
- && (reloc == (int) BFD_RELOC_16_GOTOFF
- || reloc == (int) BFD_RELOC_LO16_GOTOFF
- || reloc == (int) BFD_RELOC_HI16_GOTOFF
- || reloc == (int) BFD_RELOC_HI16_S_GOTOFF))
- as_warn (_("identifier+constant@got means identifier@got+constant"));
-
- /* Now check for identifier@suffix+constant. */
- if (*str == '-' || *str == '+')
+ char *orig_line = input_line_pointer;
+ expressionS new_exp;
+
+ input_line_pointer = str;
+ expression (&new_exp);
+ if (new_exp.X_op == O_constant)
{
- char *orig_line = input_line_pointer;
- expressionS new_exp;
-
- input_line_pointer = str;
- expression (&new_exp);
- if (new_exp.X_op == O_constant)
- {
- exp_p->X_add_number += new_exp.X_add_number;
- str = input_line_pointer;
- }
-
- if (&input_line_pointer != str_p)
- input_line_pointer = orig_line;
+ exp_p->X_add_number += new_exp.X_add_number;
+ str = input_line_pointer;
}
+
+ if (&input_line_pointer != str_p)
+ input_line_pointer = orig_line;
}
*str_p = str;