From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, Riku Voipio <riku.voipio@iki.fi>,
Icenowy Zheng <icenowy@aosc.xyz>
Subject: [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests
Date: Thu, 28 Jul 2016 12:57:59 +0100 [thread overview]
Message-ID: <1469707079-9049-1-git-send-email-peter.maydell@linaro.org> (raw)
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 <icenowy@aosc.xyz>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
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
next reply other threads:[~2016-07-28 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-28 11:57 Peter Maydell [this message]
2016-07-28 19:19 ` [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests Laurent Vivier
2016-07-28 20:38 ` Peter Maydell
2016-07-28 20:36 ` Laurent Vivier
2016-07-28 20:43 ` Peter Maydell
2016-07-29 0:13 ` Laurent Vivier
2016-08-01 9:04 ` Riku Voipio
2016-08-01 10:02 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469707079-9049-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=icenowy@aosc.xyz \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).