diff mbox series

[v2,5/6] target/riscv: Set instance_align on RISCVCPU TypeInfo

Message ID 20200916004638.2444147-6-richard.henderson@linaro.org
State New
Headers show
Series qom: Allow object to be aligned | expand

Commit Message

Richard Henderson Sept. 16, 2020, 12:46 a.m. UTC
Fix alignment of CPURISCVState.vreg.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Cc: qemu-riscv@nongnu.org
---
 target/riscv/cpu.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alistair Francis Sept. 16, 2020, 2:58 p.m. UTC | #1
On Tue, Sep 15, 2020 at 5:47 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>

> Fix alignment of CPURISCVState.vreg.

>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Alistair Francis <alistair.francis@wdc.com>


Alistair

> ---

> Cc: Alistair Francis <Alistair.Francis@wdc.com>

> Cc: qemu-riscv@nongnu.org

> ---

>  target/riscv/cpu.c | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c

> index 57c006df5d..0bbfd7f457 100644

> --- a/target/riscv/cpu.c

> +++ b/target/riscv/cpu.c

> @@ -628,6 +628,7 @@ static const TypeInfo riscv_cpu_type_infos[] = {

>          .name = TYPE_RISCV_CPU,

>          .parent = TYPE_CPU,

>          .instance_size = sizeof(RISCVCPU),

> +        .instance_align = __alignof__(RISCVCPU),

>          .instance_init = riscv_cpu_init,

>          .abstract = true,

>          .class_size = sizeof(RISCVCPUClass),

> --

> 2.25.1

>

>
diff mbox series

Patch

diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 57c006df5d..0bbfd7f457 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -628,6 +628,7 @@  static const TypeInfo riscv_cpu_type_infos[] = {
         .name = TYPE_RISCV_CPU,
         .parent = TYPE_CPU,
         .instance_size = sizeof(RISCVCPU),
+        .instance_align = __alignof__(RISCVCPU),
         .instance_init = riscv_cpu_init,
         .abstract = true,
         .class_size = sizeof(RISCVCPUClass),