aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall_defs.h
diff options
context:
space:
mode:
authorMaxim Ostapenko <m.ostapenko@partner.samsung.com>2015-02-02 18:18:29 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2015-02-10 09:27:20 +0300
commitaa5e03d2aa4ed19bfb7f4ce80092758018c6a71c (patch)
treecf23e1f4e6c426b4b106e363864b58e49ba08510 /linux-user/syscall_defs.h
parent55a10996034cb2e633f0437cedd97f345183c0ec (diff)
linux-user: wrong TARGET_SI_PAD_SIZE value for some targets.
Fix TARGET_SI_PAD_SIZE calculation to match the way the kernel does it. Use different TARGET_SI_PREAMBLE_SIZE for 32-bit and 64-bit targets. Signed-off-by: Maxim Ostapenko <m.ostapenko@partner.samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'linux-user/syscall_defs.h')
-rw-r--r--linux-user/syscall_defs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index ebb3be1196..9ed6de88ec 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -655,7 +655,14 @@ typedef struct {
#endif
#define TARGET_SI_MAX_SIZE 128
-#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3)
+
+#if TARGET_ABI_BITS == 32
+#define TARGET_SI_PREAMBLE_SIZE (3 * sizeof(int))
+#else
+#define TARGET_SI_PREAMBLE_SIZE (4 * sizeof(int))
+#endif
+
+#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE - TARGET_SI_PREAMBLE_SIZE) / sizeof(int))
typedef struct target_siginfo {
#ifdef TARGET_MIPS