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>
This commit is contained in:
Blue Swirl 2011-07-03 07:05:50 +00:00
parent ab3b491f21
commit 2336c1f197
3 changed files with 46 additions and 47 deletions

View file

@ -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