From c42cc0fe8629f8d40a18c52995fd1673c3a6330c Mon Sep 17 00:00:00 2001 From: mio Date: Thu, 17 Oct 2024 16:33:59 +0800 Subject: [PATCH] More 16-bits aligned cpu state targets --- qemu/target/i386/cpu.c | 3 ++- qemu/target/ppc/translate_init.inc.c | 3 ++- qemu/target/s390x/cpu.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu/target/i386/cpu.c b/qemu/target/i386/cpu.c index 854aaa7422..5b735d7c47 100644 --- a/qemu/target/i386/cpu.c +++ b/qemu/target/i386/cpu.c @@ -5076,7 +5076,8 @@ X86CPU *cpu_x86_init(struct uc_struct *uc) CPUClass *cc; X86CPUClass *xcc; - cpu = qemu_memalign(8, sizeof(*cpu)); + // env->fpregs + cpu = qemu_memalign(16, sizeof(*cpu)); if (cpu == NULL) { return NULL; } diff --git a/qemu/target/ppc/translate_init.inc.c b/qemu/target/ppc/translate_init.inc.c index 1f6d98b7e0..d2fb1974ad 100644 --- a/qemu/target/ppc/translate_init.inc.c +++ b/qemu/target/ppc/translate_init.inc.c @@ -11016,7 +11016,8 @@ PowerPCCPU *cpu_ppc_init(struct uc_struct *uc) CPUClass *cc; PowerPCCPUClass *pcc; - cpu = qemu_memalign(8, sizeof(*cpu)); + // vsr + cpu = qemu_memalign(16, sizeof(*cpu)); if (cpu == NULL) { return NULL; } diff --git a/qemu/target/s390x/cpu.c b/qemu/target/s390x/cpu.c index 036077a685..53b9ccc07e 100644 --- a/qemu/target/s390x/cpu.c +++ b/qemu/target/s390x/cpu.c @@ -245,7 +245,8 @@ S390CPU *cpu_s390_init(struct uc_struct *uc, const char *cpu_model) CPUClass *cc; // int i; - cpu = qemu_memalign(8, sizeof(*cpu)); + // vregs + cpu = qemu_memalign(16, sizeof(*cpu)); if (cpu == NULL) { return NULL; }