From be7a250d1ad5e113f55e22ec0a70478c65166967 Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Thu, 28 Oct 2010 07:37:45 +0000 Subject: 2010-10-28 Andreas Krebbel * config/tc-s390.c (md_begin): Only add to hash table if cpu and mode mask fit. 2010-10-28 Andreas Krebbel * s390-opc.txt: cfxr, cfdr and cfer z900 -> g5. --- gas/config/tc-s390.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'gas/config/tc-s390.c') diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index cf9f8a1..273ddd6 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -506,13 +506,18 @@ md_begin (void) break; op++; } - retval = hash_insert (s390_opcode_hash, op->name, (void *) op); - if (retval != (const char *) NULL) - { - as_bad (_("Internal assembler error for instruction %s"), - op->name); - dup_insn = TRUE; + + if (op->min_cpu <= current_cpu && (op->modes & current_mode_mask)) + { + retval = hash_insert (s390_opcode_hash, op->name, (void *) op); + if (retval != (const char *) NULL) + { + as_bad (_("Internal assembler error for instruction %s"), + op->name); + dup_insn = TRUE; + } } + while (op < op_end - 1 && strcmp (op->name, op[1].name) == 0) op++; } -- cgit v1.1