diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-09-11 15:05:41 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-10-26 17:18:58 +0000 |
commit | 11e66bca8ab0985e988e7c2fd019b743d79b4732 (patch) | |
tree | a7ab48fcba8f7f02ad81708c3452ef6fa7dcbe9e /target-sparc/int64_helper.c | |
parent | ec0ceb1759317a8c0e4b4fd63087aca8ecb6cf96 (diff) | |
download | qemu-11e66bca8ab0985e988e7c2fd019b743d79b4732.zip qemu-11e66bca8ab0985e988e7c2fd019b743d79b4732.tar.gz qemu-11e66bca8ab0985e988e7c2fd019b743d79b4732.tar.bz2 |
Sparc: convert interrupt helpers to trace framework
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/int64_helper.c')
-rw-r--r-- | target-sparc/int64_helper.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/target-sparc/int64_helper.c b/target-sparc/int64_helper.c index c9c5e0e..1d471db 100644 --- a/target-sparc/int64_helper.c +++ b/target-sparc/int64_helper.c @@ -19,16 +19,9 @@ #include "cpu.h" #include "helper.h" +#include "trace.h" //#define DEBUG_PCALL -//#define DEBUG_PSTATE - -#ifdef DEBUG_PSTATE -#define DPRINTF_PSTATE(fmt, ...) \ - do { printf("PSTATE: " fmt , ## __VA_ARGS__); } while (0) -#else -#define DPRINTF_PSTATE(fmt, ...) do {} while (0) -#endif #ifdef DEBUG_PCALL static const char * const excp_names[0x80] = { @@ -172,33 +165,37 @@ trap_state *cpu_tsptr(CPUState* env) return &env->ts[env->tl & MAXTL_MASK]; } -static void do_modify_softint(CPUState *env, const char *operation, - uint32_t value) +static bool do_modify_softint(CPUState *env, uint32_t value) { if (env->softint != value) { env->softint = value; - DPRINTF_PSTATE(": %s new %08x\n", operation, env->softint); #if !defined(CONFIG_USER_ONLY) if (cpu_interrupts_enabled(env)) { cpu_check_irqs(env); } #endif + return true; } + return false; } void helper_set_softint(CPUState *env, uint64_t value) { - do_modify_softint(env, "helper_set_softint", - env->softint | (uint32_t)value); + if (do_modify_softint(env, env->softint | (uint32_t)value)) { + trace_int_helper_set_softint(env->softint); + } } void helper_clear_softint(CPUState *env, uint64_t value) { - do_modify_softint(env, "helper_clear_softint", - env->softint & (uint32_t)~value); + if (do_modify_softint(env, env->softint & (uint32_t)~value)) { + trace_int_helper_clear_softint(env->softint); + } } void helper_write_softint(CPUState *env, uint64_t value) { - do_modify_softint(env, "helper_write_softint", (uint32_t)value); + if (do_modify_softint(env, (uint32_t)value)) { + trace_int_helper_write_softint(env->softint); + } } |