Introduce switch_to_inferior_no_thread
[deliverable/binutils-gdb.git] / sim / m32c / m32c.opc
index 9f5bd4ab4e725858b0e172d8dcea26a604a9adfc..5c721d1a3d6ebc421496be2d08f36d7c6453094b 100644 (file)
@@ -1,6 +1,6 @@
 /* m32c.opc --- semantics for m32c opcodes.                    -*- mode: c -*-
 
-Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
 Contributed by Red Hat, Inc.
 
 This file is part of the GNU simulators.
@@ -32,7 +32,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define tprintf if (trace) printf
 
 static unsigned char
-getbyte ()
+getbyte (void)
 {
   int tsave = trace;
   unsigned char b;
@@ -105,8 +105,8 @@ IMM(int bytes)
 
 /* Indicate which sorts of prefixes are allowed for the current
    opcode.  */
-void
-prefix (src_allowed, dest_allowed, index_bytewidth)
+static void
+prefix (int src_allowed, int dest_allowed, int index_bytewidth)
 {
   /* At the moment, we don't do anything with this information.  We
      just wanted to get the information entered in some
@@ -125,7 +125,7 @@ prefix (src_allowed, dest_allowed, index_bytewidth)
   mb = sign_ext (s, dc.bytes * 8); \
   v = ma op mb op c; \
   tprintf("%d " #op " %d " #op " %d = %d\n", ma, mb, c, v); \
-  set_oszc (v, dc.bytes, ll > ((1 op 1) ? b2mask[dc.bytes] : 0)); \
+  set_oszc (v, dc.bytes, (1 op 1) ? (ll > b2mask[dc.bytes]) : (ll >= 0)); \
   put_dest (dc, v); \
 }
 
@@ -394,7 +394,7 @@ static int pcs[16];
 static int ipcs = 0;
 
 int
-decode_m32c()
+decode_m32c (void)
 {
   unsigned char op[40];
   int opi;
@@ -642,13 +642,13 @@ next_opcode:
 
   prefix (0, 0, 0);
   sc = decode_src23 (sss, ss, 1);
-  BIT_OPC (sc, bit, !b & carry);
+  BIT_OPC (sc, bit, (!b) & carry);
 
   /** 0000 0001 1101 sss0 ss11 0bit    BNOR src */
 
   prefix (0, 0, 0);
   sc = decode_src23 (sss, ss, 1);
-  BIT_OPC (sc, bit, !b | carry);
+  BIT_OPC (sc, bit, (!b) | carry);
 
   /** 1101 ddd0 dd01 1bit              BNOT dest */
 
@@ -680,7 +680,7 @@ next_opcode:
   /* We report the break to our caller with the PC still pointing at the 
      breakpoint instruction.  */
   put_reg (pc, m32c_opcode_pc);
-  if (verbose || 1)
+  if (verbose)
     printf("[break]\n");
   if (in_gdb || (regs.r_intbl == 0 && regs.r_intbh == 0))
     return M32C_MAKE_HIT_BREAK ();
@@ -700,7 +700,7 @@ next_opcode:
   /* We report the break to our caller with the PC still pointing at the 
      breakpoint instruction.  */
   put_reg (pc, m32c_opcode_pc);
-  if (verbose || 1)
+  if (verbose)
     printf("[gdb break]\n");
   return M32C_MAKE_HIT_BREAK ();
 
This page took 0.035351 seconds and 4 git commands to generate.