aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/helper.h
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-17 14:43:54 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-17 14:43:54 +0000
commita7812ae412311d7d47f8aa85656faadac9d64b56 (patch)
treebae5e0d6fe19739e5e6d1cdc75d84312bf175257 /target-sparc/helper.h
parent30913bae9a2cf92b5a87363ec1c7d0ad1f82cdcc (diff)
TCG variable type checking.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5729 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/helper.h')
-rw-r--r--target-sparc/helper.h210
1 files changed, 101 insertions, 109 deletions
diff --git a/target-sparc/helper.h b/target-sparc/helper.h
index 5e07917b27..430ed2b5ba 100644
--- a/target-sparc/helper.h
+++ b/target-sparc/helper.h
@@ -1,98 +1,88 @@
-#ifndef DEF_HELPER
-#define DEF_HELPER(ret, name, params) ret name params;
-#endif
+#include "def-helper.h"
#ifndef TARGET_SPARC64
-DEF_HELPER(void, helper_rett, (void))
-DEF_HELPER(void, helper_wrpsr, (target_ulong new_psr))
-DEF_HELPER(target_ulong, helper_rdpsr, (void))
+DEF_HELPER_0(rett, void)
+DEF_HELPER_1(wrpsr, void, tl)
+DEF_HELPER_0(rdpsr, tl)
#else
-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_ldda_asi, (target_ulong addr, int asi, int rd))
-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_set_softint, (uint64_t value))
-DEF_HELPER(void, helper_clear_softint, (uint64_t value))
-DEF_HELPER(void, helper_write_softint, (uint64_t value))
-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))
+DEF_HELPER_1(wrpstate, void, tl)
+DEF_HELPER_0(done, void)
+DEF_HELPER_0(retry, void)
+DEF_HELPER_0(flushw, void)
+DEF_HELPER_0(saved, void)
+DEF_HELPER_0(restored, void)
+DEF_HELPER_0(rdccr, tl)
+DEF_HELPER_1(wrccr, void, tl)
+DEF_HELPER_0(rdcwp, tl)
+DEF_HELPER_1(wrcwp, void, tl)
+DEF_HELPER_2(array8, tl, tl, tl)
+DEF_HELPER_2(alignaddr, tl, tl, tl)
+DEF_HELPER_1(popc, tl, tl)
+DEF_HELPER_3(ldda_asi, void, tl, int, int)
+DEF_HELPER_4(ldf_asi, void, tl, int, int, int)
+DEF_HELPER_4(stf_asi, void, tl, int, int, int)
+DEF_HELPER_4(cas_asi, tl, tl, tl, tl, i32)
+DEF_HELPER_4(casx_asi, tl, tl, tl, tl, i32)
+DEF_HELPER_1(set_softint, void, i64)
+DEF_HELPER_1(clear_softint, void, i64)
+DEF_HELPER_1(write_softint, void, i64)
+DEF_HELPER_2(tick_set_count, void, ptr, i64)
+DEF_HELPER_1(tick_get_count, i64, ptr)
+DEF_HELPER_2(tick_set_limit, void, ptr, i64)
#endif
-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(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))
+DEF_HELPER_2(check_align, void, tl, i32)
+DEF_HELPER_0(debug, void)
+DEF_HELPER_0(save, void)
+DEF_HELPER_0(restore, void)
+DEF_HELPER_1(flush, void, tl)
+DEF_HELPER_2(udiv, tl, tl, tl)
+DEF_HELPER_2(sdiv, tl, tl, tl)
+DEF_HELPER_2(stdf, void, tl, int)
+DEF_HELPER_2(lddf, void, tl, int)
+DEF_HELPER_2(ldqf, void, tl, int)
+DEF_HELPER_2(stqf, void, tl, int)
#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))
+DEF_HELPER_4(ld_asi, i64, tl, int, int, int)
+DEF_HELPER_4(st_asi, void, tl, i64, int, int)
#endif
-DEF_HELPER(void, helper_ldfsr, (uint32_t new_fsr))
-DEF_HELPER(void, helper_check_ieee_exceptions, (void))
-DEF_HELPER(void, helper_clear_float_exceptions, (void))
-DEF_HELPER(float32, helper_fabss, (float32 src))
-DEF_HELPER(float32, helper_fsqrts, (float32 src))
-DEF_HELPER(void, helper_fsqrtd, (void))
-DEF_HELPER(void, helper_fcmps, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmpd, (void))
-DEF_HELPER(void, helper_fcmpes, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmped, (void))
-DEF_HELPER(void, helper_fsqrtq, (void))
-DEF_HELPER(void, helper_fcmpq, (void))
-DEF_HELPER(void, helper_fcmpeq, (void))
+DEF_HELPER_1(ldfsr, void, i32)
+DEF_HELPER_0(check_ieee_exceptions, void)
+DEF_HELPER_0(clear_float_exceptions, void)
+DEF_HELPER_1(fabss, f32, f32)
+DEF_HELPER_1(fsqrts, f32, f32)
+DEF_HELPER_0(fsqrtd, void)
+DEF_HELPER_2(fcmps, void, f32, f32)
+DEF_HELPER_0(fcmpd, void)
+DEF_HELPER_2(fcmpes, void, f32, f32)
+DEF_HELPER_0(fcmped, void)
+DEF_HELPER_0(fsqrtq, void)
+DEF_HELPER_0(fcmpq, void)
+DEF_HELPER_0(fcmpeq, void)
#ifdef TARGET_SPARC64
-DEF_HELPER(void, helper_ldxfsr, (uint64_t new_fsr))
-DEF_HELPER(void, helper_fabsd, (void))
-DEF_HELPER(void, helper_fcmps_fcc1, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmps_fcc2, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmps_fcc3, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmpd_fcc1, (void))
-DEF_HELPER(void, helper_fcmpd_fcc2, (void))
-DEF_HELPER(void, helper_fcmpd_fcc3, (void))
-DEF_HELPER(void, helper_fcmpes_fcc1, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmpes_fcc2, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmpes_fcc3, (float32 src1, float32 src2))
-DEF_HELPER(void, helper_fcmped_fcc1, (void))
-DEF_HELPER(void, helper_fcmped_fcc2, (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))
+DEF_HELPER_1(ldxfsr, void, i64)
+DEF_HELPER_0(fabsd, void)
+DEF_HELPER_2(fcmps_fcc1, void, f32, f32)
+DEF_HELPER_2(fcmps_fcc2, void, f32, f32)
+DEF_HELPER_2(fcmps_fcc3, void, f32, f32)
+DEF_HELPER_0(fcmpd_fcc1, void)
+DEF_HELPER_0(fcmpd_fcc2, void)
+DEF_HELPER_0(fcmpd_fcc3, void)
+DEF_HELPER_2(fcmpes_fcc1, void, f32, f32)
+DEF_HELPER_2(fcmpes_fcc2, void, f32, f32)
+DEF_HELPER_2(fcmpes_fcc3, void, f32, f32)
+DEF_HELPER_0(fcmped_fcc1, void)
+DEF_HELPER_0(fcmped_fcc2, void)
+DEF_HELPER_0(fcmped_fcc3, void)
+DEF_HELPER_0(fabsq, void)
+DEF_HELPER_0(fcmpq_fcc1, void)
+DEF_HELPER_0(fcmpq_fcc2, void)
+DEF_HELPER_0(fcmpq_fcc3, void)
+DEF_HELPER_0(fcmpeq_fcc1, void)
+DEF_HELPER_0(fcmpeq_fcc2, void)
+DEF_HELPER_0(fcmpeq_fcc3, void)
#endif
-DEF_HELPER(void, raise_exception, (int tt))
-#define F_HELPER_0_0(name) DEF_HELPER(void, helper_f ## name, (void))
+DEF_HELPER_1(raise_exception, void, int)
+#define F_HELPER_0_0(name) DEF_HELPER_0(f ## name, void)
#define F_HELPER_DQ_0_0(name) \
F_HELPER_0_0(name ## d); \
F_HELPER_0_0(name ## q)
@@ -102,37 +92,37 @@ F_HELPER_DQ_0_0(sub);
F_HELPER_DQ_0_0(mul);
F_HELPER_DQ_0_0(div);
-DEF_HELPER(float32, helper_fadds, (float32 src1, float32 src2))
-DEF_HELPER(float32, helper_fsubs, (float32 src1, float32 src2))
-DEF_HELPER(float32, helper_fmuls, (float32 src1, float32 src2))
-DEF_HELPER(float32, helper_fdivs, (float32 src1, float32 src2))
+DEF_HELPER_2(fadds, f32, f32, f32)
+DEF_HELPER_2(fsubs, f32, f32, f32)
+DEF_HELPER_2(fmuls, f32, f32, f32)
+DEF_HELPER_2(fdivs, f32, f32, f32)
-DEF_HELPER(void, helper_fsmuld, (float32 src1, float32 src2))
+DEF_HELPER_2(fsmuld, void, f32, f32)
F_HELPER_0_0(dmulq);
-DEF_HELPER(float32, helper_fnegs, (float32 src))
-DEF_HELPER(void, helper_fitod, (int32_t src))
-DEF_HELPER(void, helper_fitoq, (int32_t src))
+DEF_HELPER_1(fnegs, f32, f32)
+DEF_HELPER_1(fitod, void, s32)
+DEF_HELPER_1(fitoq, void, s32)
-DEF_HELPER(float32, helper_fitos, (int32_t src))
+DEF_HELPER_1(fitos, f32, s32)
#ifdef TARGET_SPARC64
-DEF_HELPER(void, helper_fnegd, (void))
-DEF_HELPER(void, helper_fnegq, (void))
-DEF_HELPER(uint32_t, helper_fxtos, (void))
+DEF_HELPER_0(fnegd, void)
+DEF_HELPER_0(fnegq, void)
+DEF_HELPER_0(fxtos, i32)
F_HELPER_DQ_0_0(xto);
#endif
-DEF_HELPER(float32, helper_fdtos, (void))
-DEF_HELPER(void, helper_fstod, (float32 src))
-DEF_HELPER(float32, helper_fqtos, (void))
-DEF_HELPER(void, helper_fstoq, (float32 src))
+DEF_HELPER_0(fdtos, f32)
+DEF_HELPER_1(fstod, void, f32)
+DEF_HELPER_0(fqtos, f32)
+DEF_HELPER_1(fstoq, void, f32)
F_HELPER_0_0(qtod);
F_HELPER_0_0(dtoq);
-DEF_HELPER(int32_t, helper_fstoi, (float32 src))
-DEF_HELPER(int32_t, helper_fdtoi, (void))
-DEF_HELPER(int32_t, helper_fqtoi, (void))
+DEF_HELPER_1(fstoi, s32, f32)
+DEF_HELPER_0(fdtoi, s32)
+DEF_HELPER_0(fqtoi, s32)
#ifdef TARGET_SPARC64
-DEF_HELPER(void, helper_fstox, (uint32_t src))
+DEF_HELPER_1(fstox, void, i32)
F_HELPER_0_0(dtox);
F_HELPER_0_0(qtox);
F_HELPER_0_0(aligndata);
@@ -148,9 +138,9 @@ F_HELPER_0_0(muld8ulx16);
F_HELPER_0_0(expand);
#define VIS_HELPER(name) \
F_HELPER_0_0(name##16); \
- DEF_HELPER(uint32_t, helper_f ## name ## 16s, (uint32_t src1, uint32_t src2))\
+ DEF_HELPER_2(f ## name ## 16s, i32, i32, i32) \
F_HELPER_0_0(name##32); \
- DEF_HELPER(uint32_t, helper_f ## name ## 32s, (uint32_t src1, uint32_t src2))
+ DEF_HELPER_2(f ## name ## 32s, i32, i32, i32)
VIS_HELPER(padd);
VIS_HELPER(psub);
@@ -166,3 +156,5 @@ VIS_CMPHELPER(cmpne);
#undef F_HELPER_DQ_0_0
#undef VIS_HELPER
#undef VIS_CMPHELPER
+
+#include "def-helper.h"