aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2005-04-19 19:45:10 +0000
committerDavid S. Miller <davem@redhat.com>2005-04-19 19:45:10 +0000
commitb0825cc233279083d1ad7d7673f06d6622b33c76 (patch)
tree5c776ef79329edff0a8394fc19d90777e0285d97 /gas
parenta288642de0bfb10e98697ba33f51de1b1b0a0b1d (diff)
downloadgdb-b0825cc233279083d1ad7d7673f06d6622b33c76.zip
gdb-b0825cc233279083d1ad7d7673f06d6622b33c76.tar.gz
gdb-b0825cc233279083d1ad7d7673f06d6622b33c76.tar.bz2
* config/tc-sparc.c (md_assemble): If sparc_ip gives us a
NULL insn, exit early. Remove now spurious NULL checks. (sparc_ip): Use as_bad for unknown opcode errors, set *pinsn to NULL and exit.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-sparc.c10
2 files changed, 13 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index eb51697..31ffae6 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2005-04-19 David S. Miller <davem@davemloft.net>
+
+ * config/tc-sparc.c (md_assemble): If sparc_ip gives us a
+ NULL insn, exit early. Remove now spurious NULL checks.
+ (sparc_ip): Use as_bad for unknown opcode errors, set *pinsn
+ to NULL and exit.
+
2005-04-19 Jan Beulich <jbeulich@novell.com>
* symbols.h (symbol_find_base): Remove prototype.
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index fe361a1..ea49bba 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -1304,11 +1304,12 @@ md_assemble (str)
know (str);
special_case = sparc_ip (str, &insn);
+ if (insn == NULL)
+ return;
/* We warn about attempts to put a floating point branch in a delay slot,
unless the delay slot has been annulled. */
- if (insn != NULL
- && last_insn != NULL
+ if (last_insn != NULL
&& (insn->flags & F_FBR) != 0
&& (last_insn->flags & F_DELAYED) != 0
/* ??? This test isn't completely accurate. We assume anything with
@@ -1321,7 +1322,6 @@ md_assemble (str)
point instruction and a floating point branch. We insert one
automatically, with a warning. */
if (max_architecture < SPARC_OPCODE_ARCH_V9
- && insn != NULL
&& last_insn != NULL
&& (insn->flags & F_FBR) != 0
&& (last_insn->flags & F_FLOAT) != 0)
@@ -1417,7 +1417,9 @@ sparc_ip (str, pinsn)
break;
default:
- as_fatal (_("Unknown opcode: `%s'"), str);
+ as_bad (_("Unknown opcode: `%s'"), str);
+ *pinsn = NULL;
+ return special_case;
}
insn = (struct sparc_opcode *) hash_find (op_hash, str);
*pinsn = insn;