diff options
author | Klee Dienes <kdienes@apple.com> | 2002-11-21 09:54:12 +0000 |
---|---|---|
committer | Klee Dienes <kdienes@apple.com> | 2002-11-21 09:54:12 +0000 |
commit | 5ff3743120dac75a0f2fcb0e7b4a62dc4ca279a9 (patch) | |
tree | b778eae29702dfa436f0bbb3bf33663bcc4ca9d7 /gas/config/tc-mcore.c | |
parent | 444d9f96ab5a5d1273577111553a5af57f567a7e (diff) | |
download | fsf-binutils-gdb-5ff3743120dac75a0f2fcb0e7b4a62dc4ca279a9.zip fsf-binutils-gdb-5ff3743120dac75a0f2fcb0e7b4a62dc4ca279a9.tar.gz fsf-binutils-gdb-5ff3743120dac75a0f2fcb0e7b4a62dc4ca279a9.tar.bz2 |
2002-11-20 Klee Dienes <kdienes@apple.com>
* config/tc-mcore.c (md_begin): Use a const iterator. Don't
coalesce the name fields to use the same pointer.
* config/tc-sh.c (md_begin): Use a const iterator. Don't coalesce
the name fields to use the same pointer.
(get_specific): Check for opcodes with the same name using strcmp
as well as comparing the pointer.
Diffstat (limited to 'gas/config/tc-mcore.c')
-rw-r--r-- | gas/config/tc-mcore.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c index 538d75b..41e958d 100644 --- a/gas/config/tc-mcore.c +++ b/gas/config/tc-mcore.c @@ -432,7 +432,7 @@ mcore_s_comm (needs_align) void md_begin () { - mcore_opcode_info * opcode; + const mcore_opcode_info * opcode; char * prev_name = ""; opcode_hash_control = hash_new (); @@ -440,13 +440,7 @@ md_begin () /* Insert unique names into hash table */ for (opcode = mcore_table; opcode->name; opcode ++) { - if (streq (prev_name, opcode->name)) - { - /* Make all the opcodes with the same name point to the same - string. */ - opcode->name = prev_name; - } - else + if (! streq (prev_name, opcode->name)) { prev_name = opcode->name; hash_insert (opcode_hash_control, opcode->name, (char *) opcode); |