* pe-dll.c (auto_export): Use bsearch to speed up scan of exports
[deliverable/binutils-gdb.git] / opcodes / ppc-dis.c
index 9170e98a322d0d2bba62accbe1edf0e4fcb95ad4..e0113923c3c9c982ba7467c4540cfca237de11a4 100644 (file)
@@ -189,8 +189,8 @@ ppc_parse_cpu (ppc_cpu_t ppc_cpu, const char *arg)
        if (ppc_opts[i].sticky)
          {
            retain_flags |= ppc_opts[i].sticky;
-           if ((ppc_cpu & ~(PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX
-                            | PPC_OPCODE_SPE | PPC_OPCODE_ANY)) != 0)
+           if ((ppc_cpu & ~(ppc_cpu_t) (PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX
+                                        | PPC_OPCODE_SPE | PPC_OPCODE_ANY)) != 0)
              break;
          }
        ppc_cpu = ppc_opts[i].cpu;
@@ -227,7 +227,7 @@ powerpc_init_dialect (struct disassemble_info *info)
       if ((new_cpu = ppc_parse_cpu (dialect, arg)) != 0)
        dialect = new_cpu;
       else if (strcmp (arg, "32") == 0)
-       dialect &= ~PPC_OPCODE_64;
+       dialect &= ~(ppc_cpu_t) PPC_OPCODE_64;
       else if (strcmp (arg, "64") == 0)
        dialect |= PPC_OPCODE_64;
       else
@@ -238,12 +238,12 @@ powerpc_init_dialect (struct disassemble_info *info)
       arg = end;
     }
 
-  if ((dialect & ~PPC_OPCODE_64) == 0)
+  if ((dialect & ~(ppc_cpu_t) PPC_OPCODE_64) == 0)
     {
       if (info->mach == bfd_mach_ppc64)
        dialect |= PPC_OPCODE_64;
       else
-       dialect &= ~PPC_OPCODE_64;
+       dialect &= ~(ppc_cpu_t) PPC_OPCODE_64;
       /* Choose a reasonable default.  */
       dialect |= (PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_601
                  | PPC_OPCODE_ALTIVEC);
@@ -347,7 +347,6 @@ print_insn_powerpc (bfd_vma memaddr,
   const struct powerpc_opcode *opcode;
   const struct powerpc_opcode *opcode_end;
   unsigned long op;
-  ppc_cpu_t dialect_orig = dialect;
 
   status = (*info->read_memory_func) (memaddr, buffer, 4, info);
   if (status != 0)
@@ -386,7 +385,8 @@ print_insn_powerpc (bfd_vma memaddr,
 
       if ((insn & opcode->mask) != opcode->opcode
          || (opcode->flags & dialect) == 0
-         || (opcode->deprecated & dialect_orig) != 0)
+         || (dialect != ~(ppc_cpu_t) PPC_OPCODE_ANY
+             && (opcode->deprecated & dialect) != 0))
        continue;
 
       /* Make two passes over the operands.  First see if any of them
@@ -505,7 +505,7 @@ print_insn_powerpc (bfd_vma memaddr,
 
   if ((dialect & PPC_OPCODE_ANY) != 0)
     {
-      dialect = ~PPC_OPCODE_ANY;
+      dialect = ~(ppc_cpu_t) PPC_OPCODE_ANY;
       goto again;
     }
 
This page took 0.024776 seconds and 4 git commands to generate.