X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=target-sparc%2Fhelper.h;h=2a771b20936481055abb57637b4ded3ee3354635;hb=60aad298cb6de52f2716b2e82e1353ea9de95fd6;hp=7dc654780d3ad70c9b3df8bcea3e2695cabb6d22;hpb=c5d04e99f362aa4d3e9aef72bb3f867689a60dff;p=qemu.git diff --git a/target-sparc/helper.h b/target-sparc/helper.h index 7dc654780..2a771b209 100644 --- a/target-sparc/helper.h +++ b/target-sparc/helper.h @@ -1,171 +1,177 @@ -#ifndef DEF_HELPER -#define DEF_HELPER(ret, name, params) ret name params; -#endif +#include "exec/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_1(rett, void, env) +DEF_HELPER_2(wrpsr, void, env, tl) +DEF_HELPER_1(rdpsr, tl, env) +DEF_HELPER_1(power_down, void, env) #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_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_2(wrpil, void, env, tl) +DEF_HELPER_2(wrpstate, void, env, tl) +DEF_HELPER_1(done, void, env) +DEF_HELPER_1(retry, void, env) +DEF_HELPER_1(flushw, void, env) +DEF_HELPER_1(saved, void, env) +DEF_HELPER_1(restored, void, env) +DEF_HELPER_1(rdccr, tl, env) +DEF_HELPER_2(wrccr, void, env, tl) +DEF_HELPER_1(rdcwp, tl, env) +DEF_HELPER_2(wrcwp, void, env, tl) +DEF_HELPER_FLAGS_2(array8, TCG_CALL_NO_RWG_SE, tl, tl, tl) +DEF_HELPER_1(popc, tl, tl) +DEF_HELPER_4(ldda_asi, void, env, tl, int, int) +DEF_HELPER_5(ldf_asi, void, env, tl, int, int, int) +DEF_HELPER_5(stf_asi, void, env, tl, int, int, int) +DEF_HELPER_5(cas_asi, tl, env, tl, tl, tl, i32) +DEF_HELPER_5(casx_asi, tl, env, tl, tl, tl, i32) +DEF_HELPER_2(set_softint, void, env, i64) +DEF_HELPER_2(clear_softint, void, env, i64) +DEF_HELPER_2(write_softint, void, env, 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_3(check_align, void, env, tl, i32) +DEF_HELPER_1(debug, void, env) +DEF_HELPER_1(save, void, env) +DEF_HELPER_1(restore, void, env) +DEF_HELPER_3(udiv, tl, env, tl, tl) +DEF_HELPER_3(udiv_cc, tl, env, tl, tl) +DEF_HELPER_3(sdiv, tl, env, tl, tl) +DEF_HELPER_3(sdiv_cc, tl, env, tl, tl) +DEF_HELPER_3(taddcctv, tl, env, tl, tl) +DEF_HELPER_3(tsubcctv, tl, env, tl, tl) +#ifdef TARGET_SPARC64 +DEF_HELPER_3(sdivx, s64, env, s64, s64) +DEF_HELPER_3(udivx, i64, env, i64, i64) #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)) +DEF_HELPER_3(ldqf, void, env, tl, int) +DEF_HELPER_3(stqf, void, env, 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_5(ld_asi, i64, env, tl, int, int, int) +DEF_HELPER_5(st_asi, void, env, 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_2(ldfsr, void, env, i32) +DEF_HELPER_FLAGS_1(fabss, TCG_CALL_NO_RWG_SE, f32, f32) +DEF_HELPER_2(fsqrts, f32, env, f32) +DEF_HELPER_2(fsqrtd, f64, env, f64) +DEF_HELPER_3(fcmps, void, env, f32, f32) +DEF_HELPER_3(fcmpd, void, env, f64, f64) +DEF_HELPER_3(fcmpes, void, env, f32, f32) +DEF_HELPER_3(fcmped, void, env, f64, f64) +DEF_HELPER_1(fsqrtq, void, env) +DEF_HELPER_1(fcmpq, void, env) +DEF_HELPER_1(fcmpeq, void, env) #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_2(ldxfsr, void, env, i64) +DEF_HELPER_FLAGS_1(fabsd, TCG_CALL_NO_RWG_SE, f64, f64) +DEF_HELPER_3(fcmps_fcc1, void, env, f32, f32) +DEF_HELPER_3(fcmps_fcc2, void, env, f32, f32) +DEF_HELPER_3(fcmps_fcc3, void, env, f32, f32) +DEF_HELPER_3(fcmpd_fcc1, void, env, f64, f64) +DEF_HELPER_3(fcmpd_fcc2, void, env, f64, f64) +DEF_HELPER_3(fcmpd_fcc3, void, env, f64, f64) +DEF_HELPER_3(fcmpes_fcc1, void, env, f32, f32) +DEF_HELPER_3(fcmpes_fcc2, void, env, f32, f32) +DEF_HELPER_3(fcmpes_fcc3, void, env, f32, f32) +DEF_HELPER_3(fcmped_fcc1, void, env, f64, f64) +DEF_HELPER_3(fcmped_fcc2, void, env, f64, f64) +DEF_HELPER_3(fcmped_fcc3, void, env, f64, f64) +DEF_HELPER_1(fabsq, void, env) +DEF_HELPER_1(fcmpq_fcc1, void, env) +DEF_HELPER_1(fcmpq_fcc2, void, env) +DEF_HELPER_1(fcmpq_fcc3, void, env) +DEF_HELPER_1(fcmpeq_fcc1, void, env) +DEF_HELPER_1(fcmpeq_fcc2, void, env) +DEF_HELPER_1(fcmpeq_fcc3, void, env) #endif -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); \ - F_HELPER_0_0(name ## q) -#define F_HELPER_DQ_0_0(name) \ - F_HELPER_0_0(name ## d); \ - F_HELPER_0_0(name ## q) +DEF_HELPER_2(raise_exception, noreturn, env, int) +#define F_HELPER_0_1(name) DEF_HELPER_1(f ## name, void, env) -F_HELPER_DQ_0_0(add); -F_HELPER_DQ_0_0(sub); -F_HELPER_DQ_0_0(mul); -F_HELPER_DQ_0_0(div); +DEF_HELPER_3(faddd, f64, env, f64, f64) +DEF_HELPER_3(fsubd, f64, env, f64, f64) +DEF_HELPER_3(fmuld, f64, env, f64, f64) +DEF_HELPER_3(fdivd, f64, env, f64, f64) +F_HELPER_0_1(addq) +F_HELPER_0_1(subq) +F_HELPER_0_1(mulq) +F_HELPER_0_1(divq) -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_3(fadds, f32, env, f32, f32) +DEF_HELPER_3(fsubs, f32, env, f32, f32) +DEF_HELPER_3(fmuls, f32, env, f32, f32) +DEF_HELPER_3(fdivs, f32, env, f32, f32) -F_HELPER_0_0(smuld); -F_HELPER_0_0(dmulq); +DEF_HELPER_3(fsmuld, f64, env, f32, f32) +DEF_HELPER_3(fdmulq, void, env, f64, f64) -DEF_HELPER(float32, helper_fnegs, (float32 src)) -F_HELPER_0_0(itod); -DEF_HELPER(void, helper_fitoq, (int32_t src)) +DEF_HELPER_FLAGS_1(fnegs, TCG_CALL_NO_RWG_SE, f32, f32) +DEF_HELPER_2(fitod, f64, env, s32) +DEF_HELPER_2(fitoq, void, env, s32) -DEF_HELPER(float32, helper_fitos, (int32_t src)) +DEF_HELPER_2(fitos, f32, env, s32) #ifdef TARGET_SPARC64 -DEF_HELPER(void, helper_fnegd, (void)) -DEF_HELPER(void, helper_fnegq, (void)) -F_HELPER_SDQ_0_0(xto); +DEF_HELPER_FLAGS_1(fnegd, TCG_CALL_NO_RWG_SE, f64, f64) +DEF_HELPER_1(fnegq, void, env) +DEF_HELPER_2(fxtos, f32, env, s64) +DEF_HELPER_2(fxtod, f64, env, s64) +DEF_HELPER_2(fxtoq, void, env, s64) #endif -F_HELPER_0_0(dtos); -F_HELPER_0_0(stod); -DEF_HELPER(float32, helper_fqtos, (void)) -DEF_HELPER(void, helper_fstoq, (float32 src)) -F_HELPER_0_0(qtod); -F_HELPER_0_0(dtoq); -DEF_HELPER(int32_t, helper_fstoi, (float32 src)) -F_HELPER_0_0(dtoi); -DEF_HELPER(int32_t, helper_fqtoi, (void)) +DEF_HELPER_2(fdtos, f32, env, f64) +DEF_HELPER_2(fstod, f64, env, f32) +DEF_HELPER_1(fqtos, f32, env) +DEF_HELPER_2(fstoq, void, env, f32) +DEF_HELPER_1(fqtod, f64, env) +DEF_HELPER_2(fdtoq, void, env, f64) +DEF_HELPER_2(fstoi, s32, env, f32) +DEF_HELPER_2(fdtoi, s32, env, f64) +DEF_HELPER_1(fqtoi, s32, env) #ifdef TARGET_SPARC64 -F_HELPER_0_0(stox); -F_HELPER_0_0(dtox); -F_HELPER_0_0(qtox); -F_HELPER_0_0(aligndata); +DEF_HELPER_2(fstox, s64, env, f32) +DEF_HELPER_2(fdtox, s64, env, f64) +DEF_HELPER_1(fqtox, s64, env) -F_HELPER_0_0(pmerge); -F_HELPER_0_0(mul8x16); -F_HELPER_0_0(mul8x16al); -F_HELPER_0_0(mul8x16au); -F_HELPER_0_0(mul8sux16); -F_HELPER_0_0(mul8ulx16); -F_HELPER_0_0(muld8sux16); -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))\ - F_HELPER_0_0(name##32); \ - DEF_HELPER(uint32_t, helper_f ## name ## 32s, (uint32_t src1, uint32_t src2)) +DEF_HELPER_FLAGS_2(fpmerge, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fmul8x16, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fmul8x16al, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fmul8x16au, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fmul8sux16, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fmul8ulx16, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fmuld8sux16, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fmuld8ulx16, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_2(fexpand, TCG_CALL_NO_RWG_SE, i64, i64, i64) +DEF_HELPER_FLAGS_3(pdist, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) +DEF_HELPER_FLAGS_2(fpack16, TCG_CALL_NO_RWG_SE, i32, i64, i64) +DEF_HELPER_FLAGS_3(fpack32, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) +DEF_HELPER_FLAGS_2(fpackfix, TCG_CALL_NO_RWG_SE, i32, i64, i64) +DEF_HELPER_FLAGS_3(bshuffle, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) +#define VIS_HELPER(name) \ + DEF_HELPER_FLAGS_2(f ## name ## 16, TCG_CALL_NO_RWG_SE, \ + i64, i64, i64) \ + DEF_HELPER_FLAGS_2(f ## name ## 16s, TCG_CALL_NO_RWG_SE, \ + i32, i32, i32) \ + DEF_HELPER_FLAGS_2(f ## name ## 32, TCG_CALL_NO_RWG_SE, \ + i64, i64, i64) \ + DEF_HELPER_FLAGS_2(f ## name ## 32s, TCG_CALL_NO_RWG_SE, \ + i32, i32, i32) -VIS_HELPER(padd); -VIS_HELPER(psub); -#define VIS_CMPHELPER(name) \ - F_HELPER_0_0(name##16); \ - F_HELPER_0_0(name##32) -VIS_CMPHELPER(cmpgt); -VIS_CMPHELPER(cmpeq); -VIS_CMPHELPER(cmple); -VIS_CMPHELPER(cmpne); +VIS_HELPER(padd) +VIS_HELPER(psub) +#define VIS_CMPHELPER(name) \ + DEF_HELPER_FLAGS_2(f##name##16, TCG_CALL_NO_RWG_SE, \ + i64, i64, i64) \ + DEF_HELPER_FLAGS_2(f##name##32, TCG_CALL_NO_RWG_SE, \ + i64, i64, i64) +VIS_CMPHELPER(cmpgt) +VIS_CMPHELPER(cmpeq) +VIS_CMPHELPER(cmple) +VIS_CMPHELPER(cmpne) #endif -#undef F_HELPER_0_0 -#undef F_HELPER_DQ_0_0 +#undef F_HELPER_0_1 #undef VIS_HELPER #undef VIS_CMPHELPER +DEF_HELPER_1(compute_psr, void, env) +DEF_HELPER_1(compute_C_icc, i32, env) + +#include "exec/def-helper.h"