X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=opcodes%2Fm88k-dis.c;h=360aa32f839fc8f6d93984138fa6561191a63211;hb=06fe285fd293e999481ec8f5c619658aa5e3b48b;hp=654d33a2c7a23a093fe19e5e266200b61a3b97fe;hpb=0fd3a4776c8f607cc778cde80f9215089d36387e;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/m88k-dis.c b/opcodes/m88k-dis.c index 654d33a2c7..360aa32f83 100644 --- a/opcodes/m88k-dis.c +++ b/opcodes/m88k-dis.c @@ -1,20 +1,19 @@ /* Print instructions for the Motorola 88000, for GDB and GNU Binutils. - Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 2000, 2001, - 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 1986-2016 Free Software Foundation, Inc. Contributed by Data General Corporation, November 1989. Partially derived from an earlier printcmd.c. - This file is part of GDB and the GNU Binutils. + This file is part of the GNU opcodes library. - This program is free software; you can redistribute it and/or modify + 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 2 of the License, or - (at your option) any later version. + the Free Software Foundation; either version 3, or (at your option) + any later version. - This program 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. + 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 program; if not, write to the Free Software @@ -276,15 +275,15 @@ const INSTAB instructions[] = {0x8400bc20,"fcmpu.sxs ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, {0x8400bd20,"fcmpu.sxx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x84000820,"fcvt.sd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x84000880,"fcvt.ds ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x84000820,"fcvt.ds ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x84000880,"fcvt.sd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x84008880,"fcvt.ds ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x840088c0,"fcvt.dx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x84008820,"fcvt.sd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x84008840,"fcvt.sx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x84008920,"fcvt.xd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, - {0x84008900,"fcvt.xs ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x84008880,"fcvt.sd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x840088c0,"fcvt.xd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x84008820,"fcvt.ds ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x84008840,"fcvt.xs ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x84008920,"fcvt.dx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, + {0x84008900,"fcvt.sx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, {0x8400f2a0,"fdiv.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, {0x8400f280,"fdiv.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, @@ -523,7 +522,7 @@ HASHTAB *hashtable[HASHVAL] = {0}; /* Initialize the disassembler instruction table. - + Initialize the hash table and instruction table for the disassembler. This should be called once before the first call to disasm(). */ @@ -550,14 +549,14 @@ init_disasm (void) hashtable[hashvalue] = &hashentries[i]; } } - + /* Decode an Operand of an instruction. - + This function formats and writes an operand of an instruction to info based on the operand specification. When the `first' flag is set this is the first operand of an instruction. Undefined operand types cause a message. - + Parameters: disassemble_info where the operand may be printed OPSPEC *opptr pointer to an operand specification @@ -565,7 +564,7 @@ init_disasm (void) UINT pc pc of instruction; used for pc-relative disp. int first flag which if nonzero indicates the first operand of an instruction - + The operand specified is extracted from the instruction and is written to buf in the format specified. The operand is preceded by a comma if it is not the first operand of an instruction and it is @@ -655,7 +654,7 @@ printop (struct disassemble_info *info, else (*info->fprintf_func) (info->stream, "%x", extracted_field); break; - + case PCREL: (*info->print_address_func) (pc + (4 * (SEXT (inst, opptr->offset, opptr->width))), @@ -684,7 +683,7 @@ printop (struct disassemble_info *info, `pc' should be the address of this instruction, it will be used to print the target address if this is a relative jump or call the disassembled instruction is written to `info'. - + The function returns the length of this instruction in bytes. */ static int @@ -696,7 +695,7 @@ m88kdis (bfd_vma pc, unsigned int opcode; const HASHTAB *entry_ptr; int opmask; - unsigned int class; + unsigned int in_class; if (! ihashtab_initialized) { @@ -706,17 +705,17 @@ m88kdis (bfd_vma pc, /* Create the appropriate mask to isolate the opcode. */ opmask = DEFMASK; - class = instruction & DEFMASK; - if ((class >= SFU0) && (class <= SFU7)) + in_class = instruction & DEFMASK; + if ((in_class >= SFU0) && (in_class <= SFU7)) { if (instruction < SFU1) opmask = CTRLMASK; else opmask = SFUMASK; } - else if (class == RRR) + else if (in_class == RRR) opmask = RRRMASK; - else if (class == RRI10) + else if (in_class == RRI10) opmask = RRI10MASK; /* Isolate the opcode. */