breakpoints/19546: Fix crash after updating breakpoints
[deliverable/binutils-gdb.git] / sim / m32c / srcdest.c
index 45ad854b21c0bcf6e944e627701aa41092e2f833..d09eabdcebae6bf89464ab2b04d244523012a08b 100644 (file)
@@ -1,24 +1,22 @@
 /* srcdest.c --- decoding M32C addressing modes.
 
-Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+Copyright (C) 2005-2016 Free Software Foundation, Inc.
 Contributed by Red Hat, Inc.
 
 This file is part of the GNU simulators.
 
-The GNU simulators 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 of the
-License, or (at your option) any later version.
+This program 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 of the License, or
+(at your option) any later version.
 
-The GNU simulators 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.
+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.
 
 You should have received a copy of the GNU General Public License
-along with the GNU simulators; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA  */
+along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <stdio.h>
@@ -33,7 +31,7 @@ static int src_addend = 0;
 static int dest_addend = 0;
 
 static int
-disp8 ()
+disp8 (void)
 {
   int rv;
   int tsave = trace;
@@ -47,7 +45,7 @@ disp8 ()
 }
 
 static int
-disp16 ()
+disp16 (void)
 {
   int rv;
   int tsave = trace;
@@ -61,7 +59,7 @@ disp16 ()
 }
 
 static int
-disp24 ()
+disp24 (void)
 {
   int rv;
   int tsave = trace;
@@ -75,7 +73,7 @@ disp24 ()
 }
 
 static int
-disp20 ()
+disp20 (void)
 {
   return disp24 () & 0x000fffff;
 }
@@ -119,8 +117,6 @@ srcdest
 decode_srcdest4 (int destcode, int bw)
 {
   srcdest sd;
-  sd.bytes = bw ? 2 : 1;
-  sd.mem = (destcode >= 6) ? 1 : 0;
   static const char *dc_wnames[16] = { "r0", "r1", "r2", "r3",
     "a0", "a1", "[a0]", "[a1]",
     "disp8[a0]", "disp8[a1]", "disp8[sb]", "disp8[fb]",
@@ -128,6 +124,9 @@ decode_srcdest4 (int destcode, int bw)
   };
   static const char *dc_bnames[4] = { "r0l", "r0h", "r1l", "r1h" };;
 
+  sd.bytes = bw ? 2 : 1;
+  sd.mem = (destcode >= 6) ? 1 : 0;
+
   if (trace)
     {
       const char *n = dc_wnames[destcode];
@@ -201,8 +200,6 @@ srcdest
 decode_jumpdest (int destcode, int w)
 {
   srcdest sd;
-  sd.bytes = w ? 2 : 3;
-  sd.mem = (destcode >= 6) ? 1 : 0;
   static const char *dc_wnames[16] = { "r0", "r1", "r2", "r3",
     "a0", "a1", "[a0]", "[a1]",
     "disp8[a0]", "disp8[a1]", "disp8[sb]", "disp8[fb]",
@@ -210,6 +207,9 @@ decode_jumpdest (int destcode, int w)
   };
   static const char *dc_anames[4] = { "r0l", "r0h", "r1l", "r1h" };
 
+  sd.bytes = w ? 2 : 3;
+  sd.mem = (destcode >= 6) ? 1 : 0;
+
   if (trace)
     {
       const char *n = dc_wnames[destcode];
This page took 0.030164 seconds and 4 git commands to generate.