qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-4.1 v2 31/36] cpu: Introduce CPUNegativeOffs


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for-4.1 v2 31/36] cpu: Introduce CPUNegativeOffsetState
Date: Mon, 29 Apr 2019 15:43:11 +0100

On Thu, 28 Mar 2019 at 23:35, Richard Henderson
<address@hidden> wrote:
>
> Nothing in there so far, but all of the plumbing done
> within the target ArchCPU state.
>
> Signed-off-by: Richard Henderson <address@hidden>

> +/*
> + * This structure must be placed in ArchCPU immedately
> + * before CPUArchState, as a field named "neg".
> + */
> +typedef struct CPUNegativeOffsetState {
> +    /* Empty */
> +} CPUNegativeOffsetState;

It would be nice if we could do a compile-time assert that
 offsetof(CPUArchState, neg) + sizeof(CPUNegativeOffsetState)
  == offsetof(CPUArchState, env)

but I guess the possibility of within-struct padding
between the two structs makes that dubious. Or does our
generated code rely on there being no padding between neg
and env anyway ?

Reviewed-by: Peter Maydell <address@hidden>

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]