qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] arm: Avoid shifting left into sign bit
@ 2014-02-21 13:06 Peter Maydell
  2014-02-21 13:06 ` [Qemu-devel] [PATCH 1/4] pxa2xx: Don't shift " Peter Maydell
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Peter Maydell @ 2014-02-21 13:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-10 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 13:06 [Qemu-devel] [PATCH 0/4] arm: Avoid shifting left into sign bit Peter Maydell
2014-02-21 13:06 ` [Qemu-devel] [PATCH 1/4] pxa2xx: Don't shift " Peter Maydell
2014-02-21 13:06 ` [Qemu-devel] [PATCH 2/4] hw/arm/omap1.c: Avoid shifting left " Peter Maydell
2014-02-21 13:06 ` [Qemu-devel] [PATCH 3/4] hw/ssi/xilinx_spips.c: " Peter Maydell
2014-02-21 13:06 ` [Qemu-devel] [PATCH 4/4] hw/arm/musicpal: " Peter Maydell
2014-03-10 14:27 ` [Qemu-devel] [PATCH 0/4] arm: " Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).