2008-11-17 17:43:54 +03:00
|
|
|
#include "def-helper.h"
|
2008-02-24 17:10:06 +03:00
|
|
|
|
|
|
|
#ifndef TARGET_SPARC64
|
2011-07-04 01:01:59 +04:00
|
|
|
DEF_HELPER_1(rett, void, env)
|
|
|
|
DEF_HELPER_2(wrpsr, void, env, tl)
|
|
|
|
DEF_HELPER_1(rdpsr, tl, env)
|
2008-02-24 17:10:06 +03:00
|
|
|
#else
|
2011-07-04 01:01:59 +04:00
|
|
|
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)
|
2011-10-20 01:56:43 +04:00
|
|
|
DEF_HELPER_FLAGS_2(array8, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl)
|
2008-11-17 17:43:54 +03:00
|
|
|
DEF_HELPER_1(popc, tl, tl)
|
2011-07-05 00:34:28 +04:00
|
|
|
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)
|
2011-08-01 13:20:58 +04:00
|
|
|
DEF_HELPER_2(set_softint, void, env, i64)
|
|
|
|
DEF_HELPER_2(clear_softint, void, env, i64)
|
|
|
|
DEF_HELPER_2(write_softint, void, env, i64)
|
2008-11-17 17:43:54 +03:00
|
|
|
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)
|
2008-05-22 22:16:25 +04:00
|
|
|
#endif
|
2011-07-05 00:34:28 +04:00
|
|
|
DEF_HELPER_3(check_align, void, env, tl, i32)
|
2011-07-03 12:19:42 +04:00
|
|
|
DEF_HELPER_1(debug, void, env)
|
2011-07-04 01:01:59 +04:00
|
|
|
DEF_HELPER_1(save, void, env)
|
|
|
|
DEF_HELPER_1(restore, void, env)
|
2011-07-04 22:15:42 +04:00
|
|
|
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)
|
2012-10-06 03:55:05 +04:00
|
|
|
DEF_HELPER_3(taddcctv, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(tsubcctv, tl, env, tl, tl)
|
2012-10-06 03:55:03 +04:00
|
|
|
#ifdef TARGET_SPARC64
|
|
|
|
DEF_HELPER_3(sdivx, s64, env, s64, s64)
|
|
|
|
DEF_HELPER_3(udivx, i64, env, i64, i64)
|
|
|
|
#endif
|
2011-07-05 00:34:28 +04:00
|
|
|
DEF_HELPER_3(ldqf, void, env, tl, int)
|
|
|
|
DEF_HELPER_3(stqf, void, env, tl, int)
|
2008-05-22 22:16:25 +04:00
|
|
|
#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
|
2011-07-05 00:34:28 +04:00
|
|
|
DEF_HELPER_5(ld_asi, i64, env, tl, int, int, int)
|
|
|
|
DEF_HELPER_5(st_asi, void, env, tl, i64, int, int)
|
2008-02-24 17:10:06 +03:00
|
|
|
#endif
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_2(ldfsr, void, env, i32)
|
2011-10-20 01:56:43 +04:00
|
|
|
DEF_HELPER_FLAGS_1(fabss, TCG_CALL_CONST | TCG_CALL_PURE, f32, f32)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_2(fsqrts, f32, env, f32)
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_2(fsqrtd, f64, env, f64)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_3(fcmps, void, env, f32, f32)
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_3(fcmpd, void, env, f64, f64)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_3(fcmpes, void, env, f32, f32)
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_3(fcmped, void, env, f64, f64)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_1(fsqrtq, void, env)
|
|
|
|
DEF_HELPER_1(fcmpq, void, env)
|
|
|
|
DEF_HELPER_1(fcmpeq, void, env)
|
2008-03-04 23:00:18 +03:00
|
|
|
#ifdef TARGET_SPARC64
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_2(ldxfsr, void, env, i64)
|
2011-10-20 01:56:43 +04:00
|
|
|
DEF_HELPER_FLAGS_1(fabsd, TCG_CALL_CONST | TCG_CALL_PURE, f64, f64)
|
2011-07-03 14:42:23 +04:00
|
|
|
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)
|
2011-10-15 21:20:20 +04:00
|
|
|
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)
|
2011-07-03 14:42:23 +04:00
|
|
|
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)
|
2011-10-15 21:20:20 +04:00
|
|
|
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)
|
2011-07-03 14:42:23 +04:00
|
|
|
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)
|
2008-03-04 23:00:18 +03:00
|
|
|
#endif
|
2012-03-19 02:16:04 +04:00
|
|
|
DEF_HELPER_2(raise_exception, noreturn, env, int)
|
2011-07-03 14:42:23 +04:00
|
|
|
#define F_HELPER_0_1(name) DEF_HELPER_1(f ## name, void, env)
|
2008-09-10 23:54:51 +04:00
|
|
|
|
2011-10-15 21:20:20 +04:00
|
|
|
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)
|
2008-03-21 20:56:02 +03:00
|
|
|
|
2011-07-03 14:42:23 +04:00
|
|
|
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)
|
2008-03-21 20:56:02 +03:00
|
|
|
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_3(fsmuld, f64, env, f32, f32)
|
|
|
|
DEF_HELPER_3(fdmulq, void, env, f64, f64);
|
2008-03-21 20:56:02 +03:00
|
|
|
|
2011-10-20 01:56:43 +04:00
|
|
|
DEF_HELPER_FLAGS_1(fnegs, TCG_CALL_CONST | TCG_CALL_PURE, f32, f32)
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_2(fitod, f64, env, s32)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_2(fitoq, void, env, s32)
|
2008-09-10 23:54:51 +04:00
|
|
|
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_2(fitos, f32, env, s32)
|
2008-09-10 23:54:51 +04:00
|
|
|
|
2008-03-21 20:56:02 +03:00
|
|
|
#ifdef TARGET_SPARC64
|
2011-10-20 01:56:43 +04:00
|
|
|
DEF_HELPER_FLAGS_1(fnegd, TCG_CALL_CONST | TCG_CALL_PURE, f64, f64)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_1(fnegq, void, env)
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_2(fxtos, f32, env, s64)
|
|
|
|
DEF_HELPER_2(fxtod, f64, env, s64)
|
|
|
|
DEF_HELPER_2(fxtoq, void, env, s64)
|
2008-03-21 20:56:02 +03:00
|
|
|
#endif
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_2(fdtos, f32, env, f64)
|
|
|
|
DEF_HELPER_2(fstod, f64, env, f32)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_1(fqtos, f32, env)
|
|
|
|
DEF_HELPER_2(fstoq, void, env, f32)
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_1(fqtod, f64, env)
|
|
|
|
DEF_HELPER_2(fdtoq, void, env, f64)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_2(fstoi, s32, env, f32)
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_2(fdtoi, s32, env, f64)
|
2011-07-03 14:42:23 +04:00
|
|
|
DEF_HELPER_1(fqtoi, s32, env)
|
2008-03-21 20:56:02 +03:00
|
|
|
#ifdef TARGET_SPARC64
|
2011-10-15 21:20:20 +04:00
|
|
|
DEF_HELPER_2(fstox, s64, env, f32)
|
|
|
|
DEF_HELPER_2(fdtox, s64, env, f64)
|
|
|
|
DEF_HELPER_1(fqtox, s64, env)
|
2008-05-22 22:16:25 +04:00
|
|
|
|
2011-10-20 01:56:43 +04:00
|
|
|
DEF_HELPER_FLAGS_2(fpmerge, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fmul8x16, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fmul8x16al, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fmul8x16au, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fmul8sux16, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fmul8ulx16, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fmuld8sux16, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fmuld8ulx16, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fexpand, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
2011-10-18 04:32:26 +04:00
|
|
|
DEF_HELPER_FLAGS_3(pdist, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64, i64)
|
2011-10-18 05:03:47 +04:00
|
|
|
DEF_HELPER_FLAGS_2(fpack16, TCG_CALL_CONST | TCG_CALL_PURE, i32, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_3(fpack32, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(fpackfix, TCG_CALL_CONST | TCG_CALL_PURE, i32, i64, i64)
|
2011-10-18 20:24:43 +04:00
|
|
|
DEF_HELPER_FLAGS_3(bshuffle, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64, i64)
|
2011-10-20 01:56:43 +04:00
|
|
|
#define VIS_HELPER(name) \
|
|
|
|
DEF_HELPER_FLAGS_2(f ## name ## 16, TCG_CALL_CONST | TCG_CALL_PURE, \
|
|
|
|
i64, i64, i64) \
|
|
|
|
DEF_HELPER_FLAGS_2(f ## name ## 16s, TCG_CALL_CONST | TCG_CALL_PURE, \
|
|
|
|
i32, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_2(f ## name ## 32, TCG_CALL_CONST | TCG_CALL_PURE, \
|
|
|
|
i64, i64, i64) \
|
|
|
|
DEF_HELPER_FLAGS_2(f ## name ## 32s, TCG_CALL_CONST | TCG_CALL_PURE, \
|
|
|
|
i32, i32, i32)
|
2008-03-21 20:56:02 +03:00
|
|
|
|
|
|
|
VIS_HELPER(padd);
|
|
|
|
VIS_HELPER(psub);
|
2011-10-20 01:56:43 +04:00
|
|
|
#define VIS_CMPHELPER(name) \
|
|
|
|
DEF_HELPER_FLAGS_2(f##name##16, TCG_CALL_CONST | TCG_CALL_PURE, \
|
|
|
|
i64, i64, i64) \
|
|
|
|
DEF_HELPER_FLAGS_2(f##name##32, TCG_CALL_CONST | TCG_CALL_PURE, \
|
|
|
|
i64, i64, i64)
|
2008-03-21 20:56:02 +03:00
|
|
|
VIS_CMPHELPER(cmpgt);
|
|
|
|
VIS_CMPHELPER(cmpeq);
|
|
|
|
VIS_CMPHELPER(cmple);
|
|
|
|
VIS_CMPHELPER(cmpne);
|
|
|
|
#endif
|
2011-07-03 14:42:23 +04:00
|
|
|
#undef F_HELPER_0_1
|
2008-03-21 20:56:02 +03:00
|
|
|
#undef VIS_HELPER
|
|
|
|
#undef VIS_CMPHELPER
|
2011-07-03 20:01:57 +04:00
|
|
|
DEF_HELPER_1(compute_psr, void, env);
|
|
|
|
DEF_HELPER_1(compute_C_icc, i32, env);
|
2008-11-17 17:43:54 +03:00
|
|
|
|
|
|
|
#include "def-helper.h"
|