sync changelog with gcc, plus commit the following patch:
[deliverable/binutils-gdb.git] / opcodes / h8500-dis.c
index bc56f511f9e2cc544ad2fd5a7af059303287a0cb..1c9463afbccf355b24de2fb616eb573d451a8268 100644 (file)
@@ -1,16 +1,18 @@
 /* Disassemble h8500 instructions.
-   Copyright 1993, 1998, 2000, 2001, 2002, 2004, 2005
+   Copyright 1993, 1998, 2000, 2001, 2002, 2004, 2005, 2007
    Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
+   This file is part of the GNU opcodes library.
+
+   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
@@ -95,7 +97,7 @@ print_insn_h8500 (bfd_vma addr, disassemble_info *info)
       int rd = 0;
       int rs = 0;
       int disp = 0;
-      int abs = 0;
+      int abs_val = 0;
       int imm = 0;
       int pcrel = 0;
       int qim = 0;
@@ -152,17 +154,17 @@ print_insn_h8500 (bfd_vma addr, disassemble_info *info)
                  break;
                case ABS24:
                  FETCH_DATA (info, buffer + byte + 3);
-                 abs =
+                 abs_val =
                    (buffer[byte] << 16)
                    | (buffer[byte + 1] << 8)
                    | (buffer[byte + 2]);
                  break;
                case ABS16:
                  FETCH_DATA (info, buffer + byte + 2);
-                 abs = (buffer[byte] << 8) | (buffer[byte + 1]);
+                 abs_val = (buffer[byte] << 8) | (buffer[byte + 1]);
                  break;
                case ABS8:
-                 abs = (buffer[byte]);
+                 abs_val = (buffer[byte]);
                  break;
                case IMM16:
                  FETCH_DATA (info, buffer + byte + 2);
@@ -229,7 +231,7 @@ print_insn_h8500 (bfd_vma addr, disassemble_info *info)
              func (stream, "@(0x%x:8 (%d), r%d)", disp & 0xff, disp, rd);
              break;
            case FPIND_D8:
-             func (stream, "@(0x%x:8 (%d), fp)", disp & 0xff, disp, rn);
+             func (stream, "@(0x%x:8 (%d), fp)", disp & 0xff, disp);
              break;
            case CRB:
            case CRW:
@@ -263,28 +265,28 @@ print_insn_h8500 (bfd_vma addr, disassemble_info *info)
              func (stream, "@-sp");
              break;
            case ABS24:
-             func (stream, "@0x%0x:24", abs);
+             func (stream, "@0x%0x:24", abs_val);
              break;
            case ABS16:
-             func (stream, "@0x%0x:16", abs & 0xffff);
+             func (stream, "@0x%0x:16", abs_val & 0xffff);
              break;
            case ABS8:
-             func (stream, "@0x%0x:8", abs & 0xff);
+             func (stream, "@0x%0x:8", abs_val & 0xff);
              break;
            case IMM16:
              func (stream, "#0x%0x:16", imm & 0xffff);
              break;
            case RLIST:
              {
-               int i;
+               int j;
                int nc = 0;
 
                func (stream, "(");
-               for (i = 0; i < 8; i++)
+               for (j = 0; j < 8; j++)
                  {
-                   if (imm & (1 << i))
+                   if (imm & (1 << j))
                      {
-                       func (stream, "r%d", i);
+                       func (stream, "r%d", j);
                        if (nc)
                          func (stream, ",");
                        nc = 1;
@@ -298,11 +300,11 @@ print_insn_h8500 (bfd_vma addr, disassemble_info *info)
              break;
            case PCREL16:
              func (stream, "0x%0x:16",
-                   (pcrel + addr + opcode->length) & 0xffff);
+                   (int)(pcrel + addr + opcode->length) & 0xffff);
              break;
            case PCREL8:
              func (stream, "#0x%0x:8",
-                   ((char) pcrel + addr + opcode->length) & 0xffff);
+                   (int)((char) pcrel + addr + opcode->length) & 0xffff);
              break;
            case QIM:
              func (stream, "#%d:q", qim);
This page took 0.026205 seconds and 4 git commands to generate.