提交 d9fe91d8 编写于 作者: P Peter Maydell 提交者: Riku Voipio

linux-user: Use correct alignment for long long on i386 guests

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: NIcenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
上级 09704e6d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册