From ec53b45bcd1f74f7a4c31331fa6d50b402cd6d26 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 20 Jan 2015 15:19:32 +0000 Subject: exec.c: Drop TARGET_HAS_ICE define and checks The TARGET_HAS_ICE #define is intended to indicate whether a target-* guest CPU implementation supports the breakpoint handling. However, all our guest CPUs have that support (the only two which do not define TARGET_HAS_ICE are unicore32 and openrisc, and in both those cases the bp support is present and the lack of the #define is just a bug). So remove the #define entirely: all new guest CPU support should include breakpoint handling as part of the basic implementation. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 1420484960-32365-1-git-send-email-peter.maydell@linaro.org --- linux-user/main.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'linux-user/main.c') diff --git a/linux-user/main.c b/linux-user/main.c index 67b0231..ac39ff5 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3436,10 +3436,8 @@ CPUArchState *cpu_copy(CPUArchState *env) CPUState *cpu = ENV_GET_CPU(env); CPUArchState *new_env = cpu_init(cpu_model); CPUState *new_cpu = ENV_GET_CPU(new_env); -#if defined(TARGET_HAS_ICE) CPUBreakpoint *bp; CPUWatchpoint *wp; -#endif /* Reset non arch specific state */ cpu_reset(new_cpu); @@ -3451,14 +3449,12 @@ CPUArchState *cpu_copy(CPUArchState *env) BP_CPU break/watchpoints are handled correctly on clone. */ QTAILQ_INIT(&cpu->breakpoints); QTAILQ_INIT(&cpu->watchpoints); -#if defined(TARGET_HAS_ICE) QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) { cpu_breakpoint_insert(new_cpu, bp->pc, bp->flags, NULL); } QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { cpu_watchpoint_insert(new_cpu, wp->vaddr, wp->len, wp->flags, NULL); } -#endif return new_env; } -- cgit v1.1 From d8d5119cae38da090b7a76f22cecc8088691ab49 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 20 Jan 2015 15:19:33 +0000 Subject: linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the m68k cpu_loop() use get_user_u16 to read the immediate for the simcall rahter than lduw, to bring it into line with how other archs do it and to remove another user of the ldl family of functions. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée Message-id: 1421334118-3287-8-git-send-email-peter.maydell@linaro.org --- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user/main.c') diff --git a/linux-user/main.c b/linux-user/main.c index ac39ff5..8c70be4 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2972,7 +2972,7 @@ void cpu_loop(CPUM68KState *env) { if (ts->sim_syscalls) { uint16_t nr; - nr = lduw(env->pc + 2); + get_user_u16(nr, env->pc + 2); env->pc += 4; do_m68k_simcall(env, nr); } else { -- cgit v1.1