Am 22.02.2013 19:10, schrieb Peter Maydell: > From: Andreas Färber <afaer...@suse.de> > > Introduce ENV_OFFSET macros which can be used in non-target-specific > code that needs to generate TCG instructions which reference CPUState > fields given the cpu_env register that TCG targets set up with a > pointer to the CPUArchState struct. > > Signed-off-by: Andreas Färber <afaer...@suse.de> > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > target-alpha/cpu-qom.h | 1 + > target-arm/cpu-qom.h | 2 ++ > target-cris/cpu-qom.h | 1 + > target-i386/cpu-qom.h | 1 + > target-lm32/cpu-qom.h | 1 + > target-m68k/cpu-qom.h | 1 + > target-microblaze/cpu-qom.h | 1 + > target-mips/cpu-qom.h | 1 + > target-openrisc/cpu.h | 2 ++ > target-ppc/cpu-qom.h | 3 ++- > target-s390x/cpu-qom.h | 1 + > target-sh4/cpu-qom.h | 1 + > target-sparc/cpu-qom.h | 1 + > target-unicore32/cpu-qom.h | 1 + > target-xtensa/cpu-qom.h | 1 + > 15 files changed, 18 insertions(+), 1 deletion(-) > > diff --git a/target-alpha/cpu-qom.h b/target-alpha/cpu-qom.h > index c0f6c6d..252bd14 100644 > --- a/target-alpha/cpu-qom.h > +++ b/target-alpha/cpu-qom.h > @@ -72,5 +72,6 @@ static inline AlphaCPU *alpha_env_get_cpu(CPUAlphaState > *env) > > #define ENV_GET_CPU(e) CPU(alpha_env_get_cpu(e)) > > +#define ENV_OFFSET offsetof(AlphaCPU, env) > > #endif [snip]
Compared to my rebased copy of this patch on qom-cpu-10 yours is dropping a white line per target. I've intentionally used two lines spacing for grouping and a line between definitions. Matter of taste. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg