From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSjx4-0001Un-Pz for qemu-devel@nongnu.org; Thu, 28 Jul 2016 07:58:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSjx3-0001hL-Qk for qemu-devel@nongnu.org; Thu, 28 Jul 2016 07:58:10 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:58461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSjx3-0001gG-KN for qemu-devel@nongnu.org; Thu, 28 Jul 2016 07:58:09 -0400 From: Peter Maydell Date: Thu, 28 Jul 2016 12:57:59 +0100 Message-Id: <1469707079-9049-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org, Riku Voipio , Icenowy Zheng For i386, the ABI specifies that 'long long' (8 byte values) need only be 4 aligned, but we were requiring them to be 8-aligned. This meant we were laying out the target_epoll_event structure wrongly. Add a suitable ifdef to abitypes.h to specify the i386-specific alignment requirement. Reported-by: Icenowy Zheng Signed-off-by: Peter Maydell --- include/exec/user/abitypes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h index a09d6c6..ba18860 100644 --- a/include/exec/user/abitypes.h +++ b/include/exec/user/abitypes.h @@ -15,6 +15,10 @@ #define ABI_LLONG_ALIGNMENT 2 #endif +#if defined(TARGET_I386) && !defined(TARGET_X86_64) +#define ABI_LLONG_ALIGNMENT 4 +#endif + #ifndef ABI_SHORT_ALIGNMENT #define ABI_SHORT_ALIGNMENT 2 #endif -- 1.9.1