aboutsummaryrefslogtreecommitdiff
path: root/target/m68k/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/m68k/translate.c')
-rw-r--r--target/m68k/translate.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index dec2967..eb1ba15 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -20,8 +20,8 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "exec/exec-all.h"
#include "exec/translation-block.h"
+#include "exec/target_page.h"
#include "tcg/tcg-op.h"
#include "qemu/log.h"
#include "qemu/qemu-print.h"
@@ -44,9 +44,6 @@
#undef DEFO32
#undef DEFO64
-static TCGv_i32 cpu_halted;
-static TCGv_i32 cpu_exception_index;
-
static char cpu_reg_names[2 * 8 * 3 + 5 * 4];
static TCGv cpu_dregs[8];
static TCGv cpu_aregs[8];
@@ -78,14 +75,6 @@ void m68k_tcg_init(void)
#undef DEFO32
#undef DEFO64
- cpu_halted = tcg_global_mem_new_i32(tcg_env,
- -offsetof(M68kCPU, env) +
- offsetof(CPUState, halted), "HALTED");
- cpu_exception_index = tcg_global_mem_new_i32(tcg_env,
- -offsetof(M68kCPU, env) +
- offsetof(CPUState, exception_index),
- "EXCEPTION");
-
p = cpu_reg_names;
for (i = 0; i < 8; i++) {
sprintf(p, "D%d", i);
@@ -4512,7 +4501,8 @@ DISAS_INSN(halt)
gen_exception(s, s->pc, EXCP_SEMIHOSTING);
return;
}
- tcg_gen_movi_i32(cpu_halted, 1);
+ tcg_gen_st_i32(tcg_constant_i32(1), tcg_env,
+ offsetof(CPUState, halted) - offsetof(M68kCPU, env));
gen_exception(s, s->pc, EXCP_HLT);
}
@@ -4528,7 +4518,8 @@ DISAS_INSN(stop)
ext = read_im16(env, s);
gen_set_sr_im(s, ext, 0);
- tcg_gen_movi_i32(cpu_halted, 1);
+ tcg_gen_st_i32(tcg_constant_i32(1), tcg_env,
+ offsetof(CPUState, halted) - offsetof(M68kCPU, env));
gen_exception(s, s->pc, EXCP_HLT);
}