[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/5] linux-user: Use correct alignment for long long
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 1/5] linux-user: Use correct alignment for long long on i386 guests |
Date: |
Thu, 4 Aug 2016 17:15:01 +0300 |
From: Peter Maydell <address@hidden>
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 <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
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
--
2.1.4
- [Qemu-devel] [PULL 0/5] linux-user fixes for 2.7, riku . voipio, 2016/08/04
- [Qemu-devel] [PULL 1/5] linux-user: Use correct alignment for long long on i386 guests,
riku . voipio <=
- [Qemu-devel] [PULL 3/5] linux-user: Don't write off end of new_utsname buffer, riku . voipio, 2016/08/04
- [Qemu-devel] [PULL 4/5] linux-user: Fix target_semid_ds structure definition, riku . voipio, 2016/08/04
- [Qemu-devel] [PULL 5/5] linux-user: Handle brk() attempts with very large sizes, riku . voipio, 2016/08/04
- [Qemu-devel] [PULL 2/5] linux-user: Fix memchr() argument in open_self_cmdline(), riku . voipio, 2016/08/04
- Re: [Qemu-devel] [PULL 0/5] linux-user fixes for 2.7, Peter Maydell, 2016/08/05