Remove backup ppc struct dis_private.
[deliverable/binutils-gdb.git] / opcodes / d30v-dis.c
index c8c14a4090154e22e0a5eac7d5f4eec268a34161..8dd43fb984e0361f86664497419bec6893847d3f 100644 (file)
@@ -1,5 +1,5 @@
 /* Disassemble D30V instructions.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   Copyright (C) 1997-2019 Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
@@ -21,8 +21,9 @@
 #include "sysdep.h"
 #include <stdio.h>
 #include "opcode/d30v.h"
-#include "dis-asm.h"
+#include "disassemble.h"
 #include "opintl.h"
+#include "libiberty.h"
 
 #define PC_MASK 0xFFFFFFFF
 
@@ -225,7 +226,9 @@ print_insn (struct disassemble_info *info,
                  val |= OPERAND_FLAG;
                  break;
                default:
-                 fprintf (stderr, "illegal id (%d)\n", id);
+                 /* xgettext: c-format */
+                 opcodes_error_handler (_("illegal id (%d)"), id);
+                 abort ();
                }
            }
          else if (oper->flags & OPERAND_ACC)
@@ -311,7 +314,9 @@ print_insn (struct disassemble_info *info,
          (*info->fprintf_func) (info->stream, "0x%x", val);
        }
       /* If there is another operand, then write a comma and space.  */
-      if (insn->form->operands[opind] && !(found_control && opind == 2))
+      if (opind < (int) ARRAY_SIZE (insn->form->operands)
+         && insn->form->operands[opind]
+         && !(found_control && opind == 2))
        need_comma = 1;
     }
   if (need_paren)
This page took 0.026634 seconds and 4 git commands to generate.