aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2005-07-17 00:33:45 +0000
committerDave Anglin <dave.anglin@nrc.ca>2005-07-17 00:33:45 +0000
commit8126167be051ed7755fccfe52d9284f7ffc05295 (patch)
tree3b43d3ab3c9b949c049e46f71ee8256928e9d682 /gas
parent3522fe58ee84e41455dc6e6f1e97592ba998d9f5 (diff)
downloadfsf-binutils-gdb-8126167be051ed7755fccfe52d9284f7ffc05295.zip
fsf-binutils-gdb-8126167be051ed7755fccfe52d9284f7ffc05295.tar.gz
fsf-binutils-gdb-8126167be051ed7755fccfe52d9284f7ffc05295.tar.bz2
* config/tc-hppa.c (pa_ip): Search entire mnemonic before considering
promoted match.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-hppa.c22
2 files changed, 25 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 56ec46e..87e89ff 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * config/tc-hppa.c (pa_ip): Search entire mnemonic before considering
+ promoted match.
+
2005-07-16 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am".
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 81845ad..4e8c764 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1577,10 +1577,12 @@ pa_ip (str)
char *s, c, *argstart, *name, *save_s;
const char *args;
int match = FALSE;
+ int need_promotion = FALSE;
int comma = 0;
int cmpltr, nullif, flag, cond, num;
unsigned long opcode;
struct pa_opcode *insn;
+ struct pa_opcode *promoted_insn = NULL;
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -3956,8 +3958,17 @@ pa_ip (str)
if (match == TRUE
&& bfd_get_mach (stdoutput) < insn->arch)
{
- if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
- as_warn (_("could not update architecture and machine"));
+ if (need_promotion)
+ {
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
+ as_warn (_("could not update architecture and machine"));
+ }
+ else
+ {
+ match = FALSE;
+ if (!promoted_insn)
+ promoted_insn = insn;
+ }
}
failed:
@@ -3973,6 +3984,13 @@ pa_ip (str)
}
else
{
+ if (promoted_insn)
+ {
+ insn = promoted_insn;
+ need_promotion = TRUE;
+ s = argstart;
+ continue;
+ }
as_bad (_("Invalid operands %s"), error_message);
return;
}