diff options
author | Nick Clifton <nickc@redhat.com> | 2015-04-24 15:43:21 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-04-24 15:43:21 +0100 |
commit | de7669bfa507d78f7abfe3d219b5aee9f346235e (patch) | |
tree | 52bf26d31dc3846dd1c2f41a03359be3afdc5c7a | |
parent | 63c72d1ae497cdf43db5347464a97164e720b83f (diff) | |
download | gdb-de7669bfa507d78f7abfe3d219b5aee9f346235e.zip gdb-de7669bfa507d78f7abfe3d219b5aee9f346235e.tar.gz gdb-de7669bfa507d78f7abfe3d219b5aee9f346235e.tar.bz2 |
Fix typos in sim sources exposed by static analysis.
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.
-rw-r--r-- | sim/bfin/ChangeLog | 7 | ||||
-rw-r--r-- | sim/bfin/bfin-sim.c | 2 | ||||
-rw-r--r-- | sim/erc32/ChangeLog | 6 | ||||
-rw-r--r-- | sim/erc32/exec.c | 2 | ||||
-rw-r--r-- | sim/igen/ChangeLog | 6 | ||||
-rw-r--r-- | sim/igen/misc.c | 4 |
6 files changed, 23 insertions, 4 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 64d20c3..1940edf 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -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. diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c index 364ee29..24b29e7 100644 --- a/sim/bfin/bfin-sim.c +++ b/sim/bfin/bfin-sim.c @@ -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); diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index 109a13b..4f9b502 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -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. diff --git a/sim/erc32/exec.c b/sim/erc32/exec.c index d31032b..0d87aa3 100644 --- a/sim/erc32/exec.c +++ b/sim/erc32/exec.c @@ -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; } diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog index 92d7db9..9007920 100644 --- a/sim/igen/ChangeLog +++ b/sim/igen/ChangeLog @@ -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 diff --git a/sim/igen/misc.c b/sim/igen/misc.c index 71e34fb..6501352 100644 --- a/sim/igen/misc.c +++ b/sim/igen/misc.c @@ -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; |