diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-11-29 09:34:14 +0000 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-11-29 09:34:14 +0000 |
commit | e6181b6abd09e4be7838fac3c57cc64977878e73 (patch) | |
tree | 952921bf7efce3381e1a6f72878b8a2345e77783 /gas | |
parent | 39ce1a6a19467e6b495ee1858884d0e34513d504 (diff) | |
download | gdb-e6181b6abd09e4be7838fac3c57cc64977878e73.zip gdb-e6181b6abd09e4be7838fac3c57cc64977878e73.tar.gz gdb-e6181b6abd09e4be7838fac3c57cc64977878e73.tar.bz2 |
2007-11-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
* config/tc-s390.c (md_begin): If the -mesa option is specified
add zarch opcodes to the hash table only if there is no variant
that is available for the esa mode as well.
2007-11-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
* gas/s390/esa-z9-109.d: Add check for old version of sske.
* gas/s390/esa-z9-109.s: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-s390.c | 25 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/s390/esa-z9-109.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/s390/esa-z9-109.s | 3 |
5 files changed, 30 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 4dbbd02..9d32ba2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2007-11-29 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * config/tc-s390.c (md_begin): If the -mesa option is specified + add zarch opcodes to the hash table only if there is no variant + that is available for the esa mode as well. + 2007-11-26 Thomas Ogrisegg <tom-bugs@gas.fnord.at> * config/tc-alpha.c (assemble_insn): Don't segv on NULL reloc_operand. diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index ac93faf..19fd474 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -512,17 +512,22 @@ md_begin () op_end = s390_opcodes + s390_num_opcodes; for (op = s390_opcodes; op < op_end; op++) - if (op->min_cpu <= current_cpu) - { - retval = hash_insert (s390_opcode_hash, op->name, (PTR) 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) + { + while (op < op_end - 1 && strcmp(op->name, op[1].name) == 0) + { + if (op->min_cpu <= current_cpu && (op->modes & current_mode_mask)) + break; op++; + } + retval = hash_insert (s390_opcode_hash, op->name, (PTR) 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++; } if (dup_insn) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index b1039e5..47dba46 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-11-29 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * gas/s390/esa-z9-109.d: Add check for old version of sske. + * gas/s390/esa-z9-109.s: Likewise. + 2007-11-27 Andreas Krebbel <krebbel1@de.ibm.com> * gas/s390/zarch-z9-ec.d: ("tcet", "tcdt", "tcxt", "tget", diff --git a/gas/testsuite/gas/s390/esa-z9-109.d b/gas/testsuite/gas/s390/esa-z9-109.d index d2935f3..d037909 100644 --- a/gas/testsuite/gas/s390/esa-z9-109.d +++ b/gas/testsuite/gas/s390/esa-z9-109.d @@ -10,3 +10,4 @@ Disassembly of section .text: .*: b9 92 f0 69 [ ]*trot %r6,%r9,15 .*: b9 91 f0 69 [ ]*trto %r6,%r9,15 .*: b9 90 f0 69 [ ]*trtt %r6,%r9,15 +.*: b2 2b 00 69 [ ]*sske %r6,%r9 diff --git a/gas/testsuite/gas/s390/esa-z9-109.s b/gas/testsuite/gas/s390/esa-z9-109.s index 6f4b32e..49ffaf6 100644 --- a/gas/testsuite/gas/s390/esa-z9-109.s +++ b/gas/testsuite/gas/s390/esa-z9-109.s @@ -4,3 +4,6 @@ foo: trot %r6,%r9,15 trto %r6,%r9,15 trtt %r6,%r9,15 +# z9-109 z/Architecture mode extended sske with an additional parameter +# make sure the old version still works for esa + sske %r6,%r9 |