diff options
author | Dominik Vogt <vogt@linux.vnet.ibm.com> | 2015-12-15 14:09:14 +0100 |
---|---|---|
committer | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2015-12-15 14:09:14 +0100 |
commit | 1d19cae752a7b032b8253feb4fa3b9f1dc162823 (patch) | |
tree | fcd5b5f015c8f9dc4e541049369e89e52ab6c8ba /sim/v850 | |
parent | Update the copyright notices in the affected files. (diff) | |
download | binutils-gdb-1d19cae752a7b032b8253feb4fa3b9f1dc162823.tar.gz binutils-gdb-1d19cae752a7b032b8253feb4fa3b9f1dc162823.tar.bz2 binutils-gdb-1d19cae752a7b032b8253feb4fa3b9f1dc162823.zip |
Fix invalid left shift of negative value
Fix occurrences of left-shifting negative constants in C code.
sim/arm/ChangeLog:
* thumbemu.c (handle_T2_insn): Fix left shift of negative value.
* armemu.c (handle_v6_insn): Likewise.
sim/avr/ChangeLog:
* interp.c (sign_ext): Fix left shift of negative value.
sim/mips/ChangeLog:
* micromips.igen (process_isa_mode): Fix left shift of negative
value.
sim/msp430/ChangeLog:
* msp430-sim.c (get_op, put_op): Fix left shift of negative value.
sim/v850/ChangeLog:
* simops.c (v850_bins): Fix left shift of negative value.
Diffstat (limited to 'sim/v850')
-rw-r--r-- | sim/v850/ChangeLog | 4 | ||||
-rw-r--r-- | sim/v850/simops.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 59cdf8dc23f..9b23e429472 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2015-12-15 Dominik Vogt <vogt@linux.vnet.ibm.com> + + * simops.c (v850_bins): Fix left shift of negative value. + 2015-11-17 Mike Frysinger <vapier@gentoo.org> * sim-main.h (WITH_CORE): Delete. diff --git a/sim/v850/simops.c b/sim/v850/simops.c index b8b3856ec66..40d578e5d0a 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -3317,7 +3317,7 @@ v850_bins (SIM_DESC sd, unsigned int source, unsigned int lsb, unsigned int msb, pos = lsb; width = (msb - lsb) + 1; - mask = ~ (-1 << width); + mask = ~ (-(1 << width)); source &= mask; mask <<= pos; result = (* dest) & ~ mask; |