diff options
author | Richard Henderson <rth@twiddle.net> | 2014-09-13 09:45:12 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-09-25 18:54:21 +0100 |
commit | cffe7b3249319003d776481b8a4b72d35db71355 (patch) | |
tree | 15c476ea6e4480e21877390660319653f7e45a28 /cpu-exec.c | |
parent | 1ba50f4ea01b26abe9dac95ba531533e17109826 (diff) |
qom: Add cpu_exec_enter and cpu_exec_exit hooks
In preparation for removing a bunch of ifdefs from cpu_exec.
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1410626734-3804-2-git-send-email-rth@twiddle.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index bd93165209..d5b86d092f 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -317,10 +317,7 @@ volatile sig_atomic_t exit_request; int cpu_exec(CPUArchState *env) { CPUState *cpu = ENV_GET_CPU(env); -#if !(defined(CONFIG_USER_ONLY) && \ - (defined(TARGET_M68K) || defined(TARGET_PPC) || defined(TARGET_S390X))) CPUClass *cc = CPU_GET_CLASS(cpu); -#endif #ifdef TARGET_I386 X86CPU *x86_cpu = X86_CPU(cpu); #endif @@ -382,9 +379,8 @@ int cpu_exec(CPUArchState *env) #elif defined(TARGET_XTENSA) #elif defined(TARGET_TRICORE) /* XXXXX */ -#else -#error unsupported target CPU #endif + cc->cpu_exec_enter(cpu); cpu->exception_index = -1; /* Calculate difference between guest clock and host clock. @@ -856,9 +852,8 @@ int cpu_exec(CPUArchState *env) #elif defined(TARGET_S390X) #elif defined(TARGET_XTENSA) /* XXXXX */ -#else -#error unsupported target CPU #endif + cc->cpu_exec_exit(cpu); /* fail safe : never use current_cpu outside cpu_exec() */ current_cpu = NULL; |