x86: drop bogus IgnoreSize from AES/VAES insns
[deliverable/binutils-gdb.git] / opcodes / ppc-dis.c
index bd6072ef0c11c31a08e54315d6894b433608e104..adbd12423fed901fd2f72d74e6477516baba731a 100644 (file)
@@ -94,6 +94,10 @@ struct ppc_mopt ppc_opts[] = {
     0 },
   { "750cl",   PPC_OPCODE_PPC | PPC_OPCODE_750 | PPC_OPCODE_PPCPS
     , 0 },
+  { "gekko",   PPC_OPCODE_PPC | PPC_OPCODE_750 | PPC_OPCODE_PPCPS
+    , 0 },
+  { "broadway", PPC_OPCODE_PPC | PPC_OPCODE_750 | PPC_OPCODE_PPCPS
+    , 0 },
   { "821",     PPC_OPCODE_PPC | PPC_OPCODE_860,
     0 },
   { "850",     PPC_OPCODE_PPC | PPC_OPCODE_860,
@@ -313,6 +317,9 @@ powerpc_init_dialect (struct disassemble_info *info)
     case bfd_mach_ppc_601:
       dialect = ppc_parse_cpu (dialect, &sticky, "601");
       break;
+    case bfd_mach_ppc_750:
+      dialect = ppc_parse_cpu (dialect, &sticky, "750cl");
+      break;
     case bfd_mach_ppc_a35:
     case bfd_mach_ppc_rs64ii:
     case bfd_mach_ppc_rs64iii:
@@ -444,7 +451,7 @@ operand_value_powerpc (const struct powerpc_operand *operand,
                       uint64_t insn, ppc_cpu_t dialect)
 {
   int64_t value;
-  int invalid;
+  int invalid = 0;
   /* Extract the value from the instruction.  */
   if (operand->extract)
     value = (*operand->extract) (insn, dialect, &invalid);
@@ -477,15 +484,22 @@ skip_optional_operands (const unsigned char *opindex,
                        uint64_t insn, ppc_cpu_t dialect)
 {
   const struct powerpc_operand *operand;
+  int num_optional;
 
-  for (; *opindex != 0; opindex++)
+  for (num_optional = 0; *opindex != 0; opindex++)
     {
       operand = &powerpc_operands[*opindex];
-      if ((operand->flags & PPC_OPERAND_NEXT) != 0
-         || ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
-             && operand_value_powerpc (operand, insn, dialect) !=
-                ppc_optional_operand_value (operand)))
+      if ((operand->flags & PPC_OPERAND_NEXT) != 0)
        return 0;
+      if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0)
+       {
+         /* Negative count is used as a flag to extract function.  */
+         --num_optional;
+         if (operand_value_powerpc (operand, insn, dialect)
+             != ppc_optional_operand_value (operand, insn, dialect,
+                                            num_optional))
+           return 0;
+       }
     }
 
   return 1;
This page took 0.023822 seconds and 4 git commands to generate.