diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-22 18:16:25 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-22 18:16:25 +0000 |
commit | c9e03d8f688dd915fa14d577493e60daf9a56b3c (patch) | |
tree | 747c51d5d227eeadb3962cb53cb031c285d57fec /target-sparc | |
parent | 8e9ade681b18a668d7e3a69b3c34a8a1696e8f79 (diff) | |
download | hqemu-c9e03d8f688dd915fa14d577493e60daf9a56b3c.zip hqemu-c9e03d8f688dd915fa14d577493e60daf9a56b3c.tar.gz |
Register op helpers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4534 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc')
-rw-r--r-- | target-sparc/helper.h | 189 | ||||
-rw-r--r-- | target-sparc/translate.c | 5 |
2 files changed, 101 insertions, 93 deletions
diff --git a/target-sparc/helper.h b/target-sparc/helper.h index d39830c..c64ffe8 100644 --- a/target-sparc/helper.h +++ b/target-sparc/helper.h @@ -1,97 +1,97 @@ -#define TCG_HELPER_PROTO +#ifndef DEF_HELPER +#define DEF_HELPER(ret, name, params) ret name params; +#endif #ifndef TARGET_SPARC64 -void TCG_HELPER_PROTO helper_rett(void); -void TCG_HELPER_PROTO helper_wrpsr(target_ulong new_psr); -target_ulong TCG_HELPER_PROTO helper_rdpsr(void); +DEF_HELPER(void, helper_rett, (void)) +DEF_HELPER(void, helper_wrpsr, (target_ulong new_psr)) +DEF_HELPER(target_ulong, helper_rdpsr, (void)) #else -void TCG_HELPER_PROTO helper_wrpstate(target_ulong new_state); -void TCG_HELPER_PROTO helper_done(void); -void TCG_HELPER_PROTO helper_retry(void); -void TCG_HELPER_PROTO helper_flushw(void); -void TCG_HELPER_PROTO helper_saved(void); -void TCG_HELPER_PROTO helper_restored(void); -target_ulong TCG_HELPER_PROTO helper_rdccr(void); -void TCG_HELPER_PROTO helper_wrccr(target_ulong new_ccr); -target_ulong TCG_HELPER_PROTO helper_rdcwp(void); -void TCG_HELPER_PROTO helper_wrcwp(target_ulong new_cwp); -target_ulong TCG_HELPER_PROTO helper_array8(target_ulong pixel_addr, - target_ulong cubesize); -target_ulong TCG_HELPER_PROTO helper_alignaddr(target_ulong addr, - target_ulong offset); -target_ulong TCG_HELPER_PROTO helper_popc(target_ulong val); -void TCG_HELPER_PROTO helper_ldf_asi(target_ulong addr, int asi, int size, - int rd); -void TCG_HELPER_PROTO helper_stf_asi(target_ulong addr, int asi, int size, - int rd); -target_ulong TCG_HELPER_PROTO -helper_cas_asi(target_ulong addr, target_ulong val1, - target_ulong val2, uint32_t asi); -target_ulong TCG_HELPER_PROTO -helper_casx_asi(target_ulong addr, target_ulong val1, - target_ulong val2, uint32_t asi); -void TCG_HELPER_PROTO helper_tick_set_count(void *opaque, uint64_t count); -uint64_t TCG_HELPER_PROTO helper_tick_get_count(void *opaque); -void TCG_HELPER_PROTO helper_tick_set_limit(void *opaque, uint64_t limit); +DEF_HELPER(void, helper_wrpstate, (target_ulong new_state)) +DEF_HELPER(void, helper_done, (void)) +DEF_HELPER(void, helper_retry, (void)) +DEF_HELPER(void, helper_flushw, (void)) +DEF_HELPER(void, helper_saved, (void)) +DEF_HELPER(void, helper_restored, (void)) +DEF_HELPER(target_ulong, helper_rdccr, (void)) +DEF_HELPER(void, helper_wrccr, (target_ulong new_ccr)) +DEF_HELPER(target_ulong, helper_rdcwp, (void)) +DEF_HELPER(void, helper_wrcwp, (target_ulong new_cwp)) +DEF_HELPER(target_ulong, helper_array8, (target_ulong pixel_addr, \ + target_ulong cubesize)) +DEF_HELPER(target_ulong, helper_alignaddr, (target_ulong addr, \ + target_ulong offset)) +DEF_HELPER(target_ulong, helper_popc, (target_ulong val)) +DEF_HELPER(void, helper_ldf_asi, (target_ulong addr, int asi, int size, int rd)) +DEF_HELPER(void, helper_stf_asi, (target_ulong addr, int asi, int size, int rd)) +DEF_HELPER(target_ulong, helper_cas_asi, (target_ulong addr, \ + target_ulong val1, \ + target_ulong val2, uint32_t asi)) +DEF_HELPER(target_ulong, helper_casx_asi, (target_ulong addr, \ + target_ulong val1, \ + target_ulong val2, uint32_t asi)) +DEF_HELPER(void, helper_tick_set_count, (void *opaque, uint64_t count)) +DEF_HELPER(uint64_t, helper_tick_get_count, (void *opaque)) +DEF_HELPER(void, helper_tick_set_limit, (void *opaque, uint64_t limit)) +#endif +DEF_HELPER(void, helper_trap, (target_ulong nb_trap)) +DEF_HELPER(void, helper_trapcc, (target_ulong nb_trap, target_ulong do_trap)) +DEF_HELPER(void, helper_check_align, (target_ulong addr, uint32_t align)) +DEF_HELPER(void, helper_debug, (void)) +DEF_HELPER(void, helper_save, (void)) +DEF_HELPER(void, helper_restore, (void)) +DEF_HELPER(void, helper_flush, (target_ulong addr)) +DEF_HELPER(target_ulong, helper_udiv, (target_ulong a, target_ulong b)) +DEF_HELPER(target_ulong, helper_sdiv, (target_ulong a, target_ulong b)) +DEF_HELPER(uint64_t, helper_pack64, (target_ulong high, target_ulong low)) +DEF_HELPER(void, helper_stdf, (target_ulong addr, int mem_idx)) +DEF_HELPER(void, helper_lddf, (target_ulong addr, int mem_idx)) +DEF_HELPER(void, helper_ldqf, (target_ulong addr, int mem_idx)) +DEF_HELPER(void, helper_stqf, (target_ulong addr, int mem_idx)) +#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64) +DEF_HELPER(uint64_t, helper_ld_asi, (target_ulong addr, int asi, int size, \ + int sign)) +DEF_HELPER(void, helper_st_asi, (target_ulong addr, uint64_t val, int asi, \ + int size)) #endif -void TCG_HELPER_PROTO helper_trap(target_ulong nb_trap); -void TCG_HELPER_PROTO helper_trapcc(target_ulong nb_trap, - target_ulong do_trap); -void TCG_HELPER_PROTO helper_check_align(target_ulong addr, uint32_t align); -void TCG_HELPER_PROTO helper_debug(void); -void TCG_HELPER_PROTO helper_save(void); -void TCG_HELPER_PROTO helper_restore(void); -void TCG_HELPER_PROTO helper_flush(target_ulong addr); -target_ulong TCG_HELPER_PROTO helper_udiv(target_ulong a, target_ulong b); -target_ulong TCG_HELPER_PROTO helper_sdiv(target_ulong a, target_ulong b); -uint64_t TCG_HELPER_PROTO helper_pack64(target_ulong high, target_ulong low); -void TCG_HELPER_PROTO helper_std_i386(target_ulong addr, int mem_idx); -void TCG_HELPER_PROTO helper_stdf(target_ulong addr, int mem_idx); -void TCG_HELPER_PROTO helper_lddf(target_ulong addr, int mem_idx); -void TCG_HELPER_PROTO helper_ldqf(target_ulong addr, int mem_idx); -void TCG_HELPER_PROTO helper_stqf(target_ulong addr, int mem_idx); -uint64_t TCG_HELPER_PROTO helper_ld_asi(target_ulong addr, int asi, - int size, int sign); -void TCG_HELPER_PROTO helper_st_asi(target_ulong addr, uint64_t val, int asi, - int size); -void TCG_HELPER_PROTO helper_ldfsr(void); -void TCG_HELPER_PROTO helper_stfsr(void); -void TCG_HELPER_PROTO helper_check_ieee_exceptions(void); -void TCG_HELPER_PROTO helper_clear_float_exceptions(void); -void TCG_HELPER_PROTO helper_fabss(void); -void TCG_HELPER_PROTO helper_fsqrts(void); -void TCG_HELPER_PROTO helper_fsqrtd(void); -void TCG_HELPER_PROTO helper_fcmps(void); -void TCG_HELPER_PROTO helper_fcmpd(void); -void TCG_HELPER_PROTO helper_fcmpes(void); -void TCG_HELPER_PROTO helper_fcmped(void); -void TCG_HELPER_PROTO helper_fsqrtq(void); -void TCG_HELPER_PROTO helper_fcmpq(void); -void TCG_HELPER_PROTO helper_fcmpeq(void); +DEF_HELPER(void, helper_ldfsr, (void)) +DEF_HELPER(void, helper_stfsr, (void)) +DEF_HELPER(void, helper_check_ieee_exceptions, (void)) +DEF_HELPER(void, helper_clear_float_exceptions, (void)) +DEF_HELPER(void, helper_fabss, (void)) +DEF_HELPER(void, helper_fsqrts, (void)) +DEF_HELPER(void, helper_fsqrtd, (void)) +DEF_HELPER(void, helper_fcmps, (void)) +DEF_HELPER(void, helper_fcmpd, (void)) +DEF_HELPER(void, helper_fcmpes, (void)) +DEF_HELPER(void, helper_fcmped, (void)) +DEF_HELPER(void, helper_fsqrtq, (void)) +DEF_HELPER(void, helper_fcmpq, (void)) +DEF_HELPER(void, helper_fcmpeq, (void)) #ifdef TARGET_SPARC64 -void TCG_HELPER_PROTO helper_fabsd(void); -void TCG_HELPER_PROTO helper_fcmps_fcc1(void); -void TCG_HELPER_PROTO helper_fcmpd_fcc1(void); -void TCG_HELPER_PROTO helper_fcmps_fcc2(void); -void TCG_HELPER_PROTO helper_fcmpd_fcc2(void); -void TCG_HELPER_PROTO helper_fcmps_fcc3(void); -void TCG_HELPER_PROTO helper_fcmpd_fcc3(void); -void TCG_HELPER_PROTO helper_fcmpes_fcc1(void); -void TCG_HELPER_PROTO helper_fcmped_fcc1(void); -void TCG_HELPER_PROTO helper_fcmpes_fcc2(void); -void TCG_HELPER_PROTO helper_fcmped_fcc2(void); -void TCG_HELPER_PROTO helper_fcmpes_fcc3(void); -void TCG_HELPER_PROTO helper_fcmped_fcc3(void); -void TCG_HELPER_PROTO helper_fabsq(void); -void TCG_HELPER_PROTO helper_fcmpq_fcc1(void); -void TCG_HELPER_PROTO helper_fcmpq_fcc2(void); -void TCG_HELPER_PROTO helper_fcmpq_fcc3(void); -void TCG_HELPER_PROTO helper_fcmpeq_fcc1(void); -void TCG_HELPER_PROTO helper_fcmpeq_fcc2(void); -void TCG_HELPER_PROTO helper_fcmpeq_fcc3(void); +DEF_HELPER(void, helper_fabsd, (void)) +DEF_HELPER(void, helper_fcmps_fcc1, (void)) +DEF_HELPER(void, helper_fcmpd_fcc1, (void)) +DEF_HELPER(void, helper_fcmps_fcc2, (void)) +DEF_HELPER(void, helper_fcmpd_fcc2, (void)) +DEF_HELPER(void, helper_fcmps_fcc3, (void)) +DEF_HELPER(void, helper_fcmpd_fcc3, (void)) +DEF_HELPER(void, helper_fcmpes_fcc1, (void)) +DEF_HELPER(void, helper_fcmped_fcc1, (void)) +DEF_HELPER(void, helper_fcmpes_fcc2, (void)) +DEF_HELPER(void, helper_fcmped_fcc2, (void)) +DEF_HELPER(void, helper_fcmpes_fcc3, (void)) +DEF_HELPER(void, helper_fcmped_fcc3, (void)) +DEF_HELPER(void, helper_fabsq, (void)) +DEF_HELPER(void, helper_fcmpq_fcc1, (void)) +DEF_HELPER(void, helper_fcmpq_fcc2, (void)) +DEF_HELPER(void, helper_fcmpq_fcc3, (void)) +DEF_HELPER(void, helper_fcmpeq_fcc1, (void)) +DEF_HELPER(void, helper_fcmpeq_fcc2, (void)) +DEF_HELPER(void, helper_fcmpeq_fcc3, (void)) #endif -void TCG_HELPER_PROTO raise_exception(int tt); -#define F_HELPER_0_0(name) void TCG_HELPER_PROTO helper_f ## name(void) +DEF_HELPER(void, raise_exception, (int tt)) +#define F_HELPER_0_0(name) DEF_HELPER(void, helper_f ## name, (void)) #define F_HELPER_SDQ_0_0(name) \ F_HELPER_0_0(name ## s); \ F_HELPER_0_0(name ## d); \ @@ -105,9 +105,11 @@ F_HELPER_SDQ_0_0(div); F_HELPER_0_0(smuld); F_HELPER_0_0(dmulq); -F_HELPER_SDQ_0_0(neg); +DEF_HELPER(void, helper_fnegs, (void)) F_HELPER_SDQ_0_0(ito); #ifdef TARGET_SPARC64 +DEF_HELPER(void, helper_fnegd, (void)) +DEF_HELPER(void, helper_fnegq, (void)) F_HELPER_SDQ_0_0(xto); #endif F_HELPER_0_0(dtos); @@ -124,10 +126,11 @@ F_HELPER_0_0(stox); F_HELPER_0_0(dtox); F_HELPER_0_0(qtox); F_HELPER_0_0(aligndata); -void TCG_HELPER_PROTO helper_movl_FT0_0(void); -void TCG_HELPER_PROTO helper_movl_DT0_0(void); -void TCG_HELPER_PROTO helper_movl_FT0_1(void); -void TCG_HELPER_PROTO helper_movl_DT0_1(void); +DEF_HELPER(void, helper_movl_FT0_0, (void)) +DEF_HELPER(void, helper_movl_DT0_0, (void)) +DEF_HELPER(void, helper_movl_FT0_1, (void)) +DEF_HELPER(void, helper_movl_DT0_1, (void)) + F_HELPER_0_0(not); F_HELPER_0_0(nots); F_HELPER_0_0(nor); diff --git a/target-sparc/translate.c b/target-sparc/translate.c index f89d13e..9d746bf 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -4711,6 +4711,11 @@ void gen_intermediate_code_init(CPUSPARCState *env) cpu_gregs[i] = tcg_global_mem_new(TCG_TYPE_TL, TCG_AREG0, offsetof(CPUState, gregs[i]), gregnames[i]); + /* register helpers */ + +#undef DEF_HELPER +#define DEF_HELPER(ret, name, params) tcg_register_helper(name, #name); +#include "helper.h" } } |