qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-user/riscv: Fix target_ucontext and target_sigcontext
@ 2020-04-27 20:11 Amanieu d'Antras
  2020-04-27 20:23 ` Alistair Francis
  2020-04-27 21:04 ` no-reply
  0 siblings, 2 replies; 3+ messages in thread
From: Amanieu d'Antras @ 2020-04-27 20:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, Amanieu d'Antras

These now match the field layout used by the kernel.

Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
---
 linux-user/riscv/signal.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c
index 83ecc6f799..2b15e32a7b 100644
--- a/linux-user/riscv/signal.c
+++ b/linux-user/riscv/signal.c
@@ -32,7 +32,7 @@
 struct target_sigcontext {
     abi_long pc;
     abi_long gpr[31]; /* x0 is not present, so all offsets must be -1 */
-    uint64_t fpr[32];
+    uint64_t fpr[32] __attribute__((aligned(16)));
     uint32_t fcsr;
 }; /* cf. riscv-linux:arch/riscv/include/uapi/asm/ptrace.h */
 
@@ -40,8 +40,9 @@ struct target_ucontext {
     unsigned long uc_flags;
     struct target_ucontext *uc_link;
     target_stack_t uc_stack;
-    struct target_sigcontext uc_mcontext;
     target_sigset_t uc_sigmask;
+    char __unused[1024 / 8 - sizeof(target_sigset_t)];
+    struct target_sigcontext uc_mcontext;
 };
 
 struct target_rt_sigframe {
-- 
2.26.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-27 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-27 20:11 [PATCH] linux-user/riscv: Fix target_ucontext and target_sigcontext Amanieu d'Antras
2020-04-27 20:23 ` Alistair Francis
2020-04-27 21:04 ` no-reply

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).