From fadf982584b040527aeee0ede270a4d01463d293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 22 Feb 2013 18:10:01 +0000 Subject: cpu: Introduce ENV_OFFSET macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Blue Swirl --- target-microblaze/cpu-qom.h | 1 + 1 file changed, 1 insertion(+) (limited to 'target-microblaze') diff --git a/target-microblaze/cpu-qom.h b/target-microblaze/cpu-qom.h index 5ea911c8e4..a0248a5a22 100644 --- a/target-microblaze/cpu-qom.h +++ b/target-microblaze/cpu-qom.h @@ -68,5 +68,6 @@ static inline MicroBlazeCPU *mb_env_get_cpu(CPUMBState *env) #define ENV_GET_CPU(e) CPU(mb_env_get_cpu(e)) +#define ENV_OFFSET offsetof(MicroBlazeCPU, env) #endif -- cgit v1.2.1