mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
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.
This commit is contained in:

committed by
Andreas Arnez

parent
08832196ac
commit
1d19cae752
@ -1,3 +1,7 @@
|
||||
2015-12-15 Dominik Vogt <vogt@linux.vnet.ibm.com>
|
||||
|
||||
* interp.c (sign_ext): Fix left shift of negative value.
|
||||
|
||||
2015-11-21 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (pc, cycles, avr_pc22): Delete.
|
||||
|
@ -222,7 +222,7 @@ static byte sram[MAX_AVR_SRAM];
|
||||
static int sign_ext (word val, int nb_bits)
|
||||
{
|
||||
if (val & (1 << (nb_bits - 1)))
|
||||
return val | (-1 << nb_bits);
|
||||
return val | -(1 << nb_bits);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user