Fix typos in sim sources exposed by static analysis.
authorNick Clifton <nickc@redhat.com>
Fri, 24 Apr 2015 14:43:21 +0000 (15:43 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 24 Apr 2015 14:43:21 +0000 (15:43 +0100)
bfin PR 18273
* bfin-sim.c (decode_dsp32alu_0): Remove spurious check for
s == 1.

erc32 PR 18273
* exec.c (add32): Fix typo in check for overflow.

igen PR 18273
* misc.c (a2i): Fix typos checking for uppercase letters.

sim/bfin/ChangeLog
sim/bfin/bfin-sim.c
sim/erc32/ChangeLog
sim/erc32/exec.c
sim/igen/ChangeLog
sim/igen/misc.c

index 64d20c30a09ce3d66579da33eafa116e4eb40d4f..1940edf4062d2a69bfbd6ec0d2a569ff3ac4feb0 100644 (file)
@@ -1,3 +1,10 @@
+2015-04-24  David Binderman  <dcb314@hotmail.com>
+           Nick Clifton  <nickc@redhat.com>
+
+       PR 18273
+       * bfin-sim.c (decode_dsp32alu_0): Remove spurious check for
+       s == 1.
+
 2015-04-18  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h (SIM_CPU): Add note to clean this up.
index 364ee29997259819ca1b77afbefb547d33b18969..24b29e74d182413d59e94a1b9f18d3e361473332 100644 (file)
@@ -4318,7 +4318,7 @@ decode_dsp32alu_0 (SIM_CPU *cpu, bu16 iw0, bu16 iw1)
       SET_AREG (1, 0);
     }
   else if ((aop == 0 || aop == 1 || aop == 2) && s == 1 && aopcde == 8
-          && x == 0 && s == 1 && HL == 0)
+          && x == 0 && HL == 0)
     {
       bs40 acc0 = get_extended_acc (cpu, 0);
       bs40 acc1 = get_extended_acc (cpu, 1);
index 109a13baa904cc94b686adc1a7917388f61304ea..4f9b502857f8b01ad32120de32360138cfc44744 100644 (file)
@@ -1,3 +1,9 @@
+2015-04-24  David Binderman  <dcb314@hotmail.com>
+           Nick Clifton  <nickc@redhat.com>
+
+       PR 18273
+       * exec.c (add32): Fix typo in check for overflow.
+
 2015-04-19  Jiri Gaisler  <jiri@gaisler.se>
 
        * erc32.c (current_target_byte_order): Delete.
index d31032b9b7f4a349d341c745af6ac77145df0ce4..0d87aa3d40e9cca947db5b67e2ffb00a6367292e 100644 (file)
@@ -292,7 +292,7 @@ add32 (uint32 n1, uint32 n2, int *carry)
 {
   uint32 result = n1 + n2;
 
-  *carry = result < n1 || result < n1;
+  *carry = result < n1 || result < n2;
   return result;
 }
 
index 92d7db9b3449d8769915f1b11a68a319353a9bdd..90079207be4dddaf263c50df755e1dd32c1119ce 100644 (file)
@@ -1,3 +1,9 @@
+2015-04-24  David Binderman  <dcb314@hotmail.com>
+           Nick Clifton  <nickc@redhat.com>
+
+       PR 18273
+       * misc.c (a2i): Fix typos checking for uppercase letters.
+
 2015-04-17  Mike Frysinger  <vapier@gentoo.org>
 
        * gen-engine.c (print_run_body): Change CIA_GET to CPU_PC_GET and
index 71e34fbe302a8b2bf094a481f8b89c9a1f95df0c..6501352fce2d0ea1ef0a8dc684360aff03a062c9 100644 (file)
@@ -102,7 +102,7 @@ a2i (const char *a)
   if (strcmp (a, "true") == 0 || strcmp (a, "TRUE") == 0)
     return 1;
 
-  if (strcmp (a, "false") == 0 || strcmp (a, "false") == 0)
+  if (strcmp (a, "false") == 0 || strcmp (a, "FALSE") == 0)
     return 0;
 
   if (*a == '-')
@@ -118,7 +118,7 @@ a2i (const char *a)
          a += 2;
          base = 16;
        }
-      else if (a[1] == 'b' || a[1] == 'b')
+      else if (a[1] == 'b' || a[1] == 'B')
        {
          a += 2;
          base = 2;
This page took 0.045066 seconds and 4 git commands to generate.