/* Disassemble D30V instructions.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
#include "opcode/d30v.h"
#include "disassemble.h"
#include "opintl.h"
+#include "libiberty.h"
#define PC_MASK 0xFFFFFFFF
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)
(*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)