Skip to content
Snippets Groups Projects
Commit 5d30bdcb authored by Richard Henderson's avatar Richard Henderson
Browse files

accel/tcg: Validate placement of CPUNegativeOffsetState


Verify that the distance between CPUNegativeOffsetState and
CPUArchState is no greater than any alignment requirements.

Reviewed-by: default avatarAnton Johansson <anjo@rev.ng>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent f669c992
No related branches found
No related tags found
No related merge requests found
......@@ -457,6 +457,12 @@ static inline CPUState *env_cpu(CPUArchState *env)
return &env_archcpu(env)->parent_obj;
}
/*
* Validate placement of CPUNegativeOffsetState.
*/
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) - offsetof(ArchCPU, neg) >=
sizeof(CPUNegativeOffsetState) + __alignof(CPUArchState));
/**
* env_neg(env)
* @env: The architecture environment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment