aboutsummaryrefslogtreecommitdiff
path: root/target-unicore32
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-02-22 18:10:01 +0000
committerBlue Swirl <blauwirbel@gmail.com>2013-03-03 14:28:28 +0000
commitfadf982584b040527aeee0ede270a4d01463d293 (patch)
treede8d94b847354eced90a266fa7dc3164ad897fde /target-unicore32
parent0980011b4f66482d2733ab2dd0f2f61747772c6b (diff)
cpu: Introduce ENV_OFFSET macros
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 <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-unicore32')
-rw-r--r--target-unicore32/cpu-qom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-unicore32/cpu-qom.h b/target-unicore32/cpu-qom.h
index 625c6143db..c6590bdf01 100644
--- a/target-unicore32/cpu-qom.h
+++ b/target-unicore32/cpu-qom.h
@@ -58,5 +58,6 @@ static inline UniCore32CPU *uc32_env_get_cpu(CPUUniCore32State *env)
#define ENV_GET_CPU(e) CPU(uc32_env_get_cpu(e))
+#define ENV_OFFSET offsetof(UniCore32CPU, env)
#endif