summaryrefslogtreecommitdiff
path: root/target-xtensa/helper.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-20 01:46:45 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:59 +0100
commit25733eada6c1d4928262e77e2ee1e9ed12de18fb (patch)
tree95df16c7e4d456e212dff1dc0a602d9fda29aaa8 /target-xtensa/helper.c
parentd9c27f00b174df070470d48d6577042d2186d969 (diff)
downloadqemu-25733eada6c1d4928262e77e2ee1e9ed12de18fb.tar.gz
target-xtensa: Move TCG initialization to XtensaCPU initfn
Combine this with breakpoint handler registration, guarding both with tcg_enabled() to suppress also TCG init for qtest. Rename the handler to xtensa_breakpoint_handler() since it needs to become global. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-xtensa/helper.c')
-rw-r--r--target-xtensa/helper.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c
index 14bcc7ef23..a8a64932da 100644
--- a/target-xtensa/helper.c
+++ b/target-xtensa/helper.c
@@ -54,7 +54,7 @@ static uint32_t check_hw_breakpoints(CPUXtensaState *env)
return 0;
}
-static void breakpoint_handler(CPUXtensaState *env)
+void xtensa_breakpoint_handler(CPUXtensaState *env)
{
if (env->watchpoint_hit) {
if (env->watchpoint_hit->flags & BP_CPU) {
@@ -72,8 +72,6 @@ static void breakpoint_handler(CPUXtensaState *env)
XtensaCPU *cpu_xtensa_init(const char *cpu_model)
{
- static int tcg_inited;
- static int debug_handler_inited;
XtensaCPU *cpu;
CPUXtensaState *env;
const XtensaConfig *config = NULL;
@@ -93,16 +91,6 @@ XtensaCPU *cpu_xtensa_init(const char *cpu_model)
env = &cpu->env;
env->config = config;
- if (!tcg_inited) {
- tcg_inited = 1;
- xtensa_translate_init();
- }
-
- if (!debug_handler_inited && tcg_enabled()) {
- debug_handler_inited = 1;
- cpu_set_debug_excp_handler(breakpoint_handler);
- }
-
xtensa_irq_init(env);
object_property_set_bool(OBJECT(cpu), true, "realized", NULL);