From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGpof-0006Ub-21 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 08:06:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGpoe-0007ag-AR for qemu-devel@nongnu.org; Fri, 21 Feb 2014 08:06:56 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGpoe-0007Yp-3U for qemu-devel@nongnu.org; Fri, 21 Feb 2014 08:06:56 -0500 From: Peter Maydell Date: Fri, 21 Feb 2014 13:06:44 +0000 Message-Id: <1392988008-15938-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 0/4] arm: Avoid shifting left into sign bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org 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