diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-07-03 07:05:50 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-10-23 15:08:10 +0000 |
commit | 2336c1f1970a5c5cfd34a1785af646c960b6f43f (patch) | |
tree | c5e3aab3604e8d1151bfa15140ec32ec7851a5d0 /target-sparc/helper.c | |
parent | ab3b491f2131e12503d165a8ffaef5f3a488eafe (diff) | |
download | qemu-2336c1f1970a5c5cfd34a1785af646c960b6f43f.zip qemu-2336c1f1970a5c5cfd34a1785af646c960b6f43f.tar.gz qemu-2336c1f1970a5c5cfd34a1785af646c960b6f43f.tar.bz2 |
Sparc: move trivial functions from op_helper.c
These functions don't need access to CPUState or already pass it,
so relocating them from op_helper.c to helper.c and int64_helper.c
is trivial.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/helper.c')
-rw-r--r-- | target-sparc/helper.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c index 1866f63..e9182ac 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -18,6 +18,9 @@ */ #include "cpu.h" +#include "host-utils.h" +#include "helper.h" +#include "sysemu.h" //#define DEBUG_MMU @@ -866,3 +869,41 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr) return phys_addr; } #endif + +/* misc op helpers */ +void helper_shutdown(void) +{ +#if !defined(CONFIG_USER_ONLY) + qemu_system_shutdown_request(); +#endif +} + +#ifdef TARGET_SPARC64 +target_ulong helper_popc(target_ulong val) +{ + return ctpop64(val); +} + +void helper_tick_set_count(void *opaque, uint64_t count) +{ +#if !defined(CONFIG_USER_ONLY) + cpu_tick_set_count(opaque, count); +#endif +} + +uint64_t helper_tick_get_count(void *opaque) +{ +#if !defined(CONFIG_USER_ONLY) + return cpu_tick_get_count(opaque); +#else + return 0; +#endif +} + +void helper_tick_set_limit(void *opaque, uint64_t limit) +{ +#if !defined(CONFIG_USER_ONLY) + cpu_tick_set_limit(opaque, limit); +#endif +} +#endif |