aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-01-26 23:41:12 +0000
committerIan Lance Taylor <ian@airs.com>1995-01-26 23:41:12 +0000
commit76e30835ad74dc589a2d70188fac22953efe63cc (patch)
tree5f508f8965a34f1212ff7d0c6755a58464acd8b2 /gas/config
parent669124ef4f071b63c8a488ec1e62d03c9302ef1f (diff)
downloadgdb-76e30835ad74dc589a2d70188fac22953efe63cc.zip
gdb-76e30835ad74dc589a2d70188fac22953efe63cc.tar.gz
gdb-76e30835ad74dc589a2d70188fac22953efe63cc.tar.bz2
* config/tc-ppc.c (md_begin): Permit mfdec to be duplicated on the
601. Check that the error return from hash_insert is "exists".
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-ppc.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 8f7ecae..6144d10 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -350,15 +350,23 @@ md_begin ()
retval = hash_insert (ppc_hash, op->name, (PTR) op);
if (retval != (const char *) NULL)
{
- /* When using -many, the comparison instructions are a
- harmless special case. */
- if (ppc_cpu != (PPC_OPCODE_POWER
- | PPC_OPCODE_POWER2
- | PPC_OPCODE_PPC)
- || (strcmp (op->name, "cmpli") != 0
- && strcmp (op->name, "cmpi") != 0
- && strcmp (op->name, "cmp") != 0
- && strcmp (op->name, "cmpl") != 0))
+ /* We permit a duplication of the mfdec instruction on
+ the 601, because it seems to have one value on the
+ 601 and a different value on other PowerPC
+ processors. It's easier to permit a duplication than
+ to define a new instruction type flag. When using
+ -many, the comparison instructions are a harmless
+ special case. */
+ if (strcmp (retval, "exists") != 0
+ || (((ppc_cpu & PPC_OPCODE_601) == 0
+ || strcmp (op->name, "mfdec") != 0)
+ && (ppc_cpu != (PPC_OPCODE_POWER
+ | PPC_OPCODE_POWER2
+ | PPC_OPCODE_PPC)
+ || (strcmp (op->name, "cmpli") != 0
+ && strcmp (op->name, "cmpi") != 0
+ && strcmp (op->name, "cmp") != 0
+ && strcmp (op->name, "cmpl") != 0))))
abort ();
}
}