X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Falpha-dis.c;h=ad8e6e27c9cc20afc21f880407c0dcf51d060014;hb=179aed7fdc7864ad3623a680b371a98baadb7705;hp=630454d2b86b6712c37f358a8be4b5c0f53fd2c6;hpb=33822a8e759c9fab4599d5c942719296eef720cd;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/alpha-dis.c b/opcodes/alpha-dis.c index 630454d2b8..ad8e6e27c9 100644 --- a/opcodes/alpha-dis.c +++ b/opcodes/alpha-dis.c @@ -1,28 +1,28 @@ /* alpha-dis.c -- Disassemble Alpha AXP instructions - Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996-2019 Free Software Foundation, Inc. Contributed by Richard Henderson , patterned after the PPC opcode handling written by Ian Lance Taylor. -This file is part of GDB, GAS, and the GNU binutils. + This file is part of libopcodes. -GDB, GAS, and the GNU binutils are free software; you can redistribute -them and/or modify them under the terms of the GNU General Public -License as published by the Free Software Foundation; either version -2, or (at your option) any later version. + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. -GDB, GAS, and the GNU binutils are distributed in the hope that they -will be useful, but WITHOUT ANY WARRANTY; without even the implied -warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -the GNU General Public License for more details. + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. -You should have received a copy of the GNU General Public License -along with this file; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this file; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ -#include #include "sysdep.h" -#include "dis-asm.h" +#include +#include "disassemble.h" #include "opcode/alpha.h" /* OSF register names. */ @@ -54,9 +54,7 @@ static const char * const vms_regnames[64] = { /* Disassemble Alpha instructions. */ int -print_insn_alpha (memaddr, info) - bfd_vma memaddr; - struct disassemble_info *info; +print_insn_alpha (bfd_vma memaddr, struct disassemble_info *info) { static const struct alpha_opcode *opcode_index[AXP_NOPS+1]; const char * const * regnames; @@ -118,7 +116,7 @@ print_insn_alpha (memaddr, info) opcode_end = opcode_index[op + 1]; for (opcode = opcode_index[op]; opcode < opcode_end; ++opcode) { - if ((insn & opcode->mask) != opcode->opcode) + if ((insn ^ opcode->opcode) & opcode->mask) continue; if (!(opcode->flags & isa_mask))