* config/tc-sh.c (md_begin): When encountering insn that are
authorJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 16 Mar 2000 23:50:18 +0000 (23:50 +0000)
committerJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 16 Mar 2000 23:50:18 +0000 (23:50 +0000)
not supported by the current arch, only change the name if
its contents are the same as prev_name.
(get_specific): If the the architecture doesn't match, fail.

gas/ChangeLog
gas/config/tc-sh.c

index 4916098e9c04b26234f6cc8fe3c1c7cc6d996501..2b7a433d0f0039a4925cc00d8964713c5dc5c1cb 100644 (file)
@@ -1,3 +1,10 @@
+Thu Mar 16 23:45:16 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * config/tc-sh.c (md_begin): When encountering insn that are
+       not supported by the current arch, only change the name if
+       its contents are the same as prev_name.
+       (get_specific): If the the architecture doesn't match, fail.
+
 Thu Mar 16 21:18:13 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * config/tc-sh.c (IDENT_CHAR): Define.
index 561f28219f5d4bd4328d38517bb368e7b13abca6..b8b452c274c57bb2b8949695588a85650f744576 100644 (file)
@@ -222,8 +222,10 @@ md_begin ()
   /* Insert unique names into hash table */
   for (opcode = sh_table; opcode->name; opcode++)
     {
-      if (opcode->arch & target_arch && strcmp (prev_name, opcode->name))
+      if (strcmp (prev_name, opcode->name))
        {
+         if (! (opcode->arch & target_arch))
+           continue;
          prev_name = opcode->name;
          hash_insert (opcode_hash_control, opcode->name, (char *) opcode);
        }
@@ -1148,6 +1150,8 @@ get_specific (opcode, operands)
              goto fail;
            }
        }
+      if ( !(valid_arch & this_try->arch))
+       goto fail;
       valid_arch &= this_try->arch;
       return this_try;
     fail:;