Four simple patches which correct situations where we shift left
into the sign bit of a signed integer type, which is undefined
behaviour in C. These are by no means the only examples (even
restricted to ARM board code; try "grep '1 << 31'"), but I'm
vaguely aiming for "get 'make check' to not emit any clang
-fsanitize=undefined warnings".

Peter Maydell (4):
  pxa2xx: Don't shift into sign bit
  hw/arm/omap1.c: Avoid shifting left into sign bit
  hw/ssi/xilinx_spips.c: Avoid shifting left into sign bit
  hw/arm/musicpal: Avoid shifting left into sign bit

 hw/arm/musicpal.c     |  4 ++--
 hw/arm/omap1.c        | 24 ++++++++++++++----------
 hw/arm/pxa2xx.c       |  6 +++---
 hw/arm/pxa2xx_gpio.c  |  2 +-
 hw/arm/pxa2xx_pic.c   |  4 ++--
 hw/ssi/xilinx_spips.c |  4 ++--
 6 files changed, 24 insertions(+), 20 deletions(-)

-- 
1.8.5


Reply via email to