2008-11-17 17:43:54 +03:00
|
|
|
#include "def-helper.h"
|
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_3(raise_exception_err, noreturn, env, i32, int)
|
|
|
|
DEF_HELPER_2(raise_exception, noreturn, env, i32)
|
2008-06-08 11:42:23 +04:00
|
|
|
|
2008-06-20 19:12:14 +04:00
|
|
|
#ifdef TARGET_MIPS64
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_4(ldl, tl, env, tl, tl, int)
|
|
|
|
DEF_HELPER_4(ldr, tl, env, tl, tl, int)
|
|
|
|
DEF_HELPER_4(sdl, void, env, tl, tl, int)
|
|
|
|
DEF_HELPER_4(sdr, void, env, tl, tl, int)
|
2008-06-20 19:12:14 +04:00
|
|
|
#endif
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_4(lwl, tl, env, tl, tl, int)
|
|
|
|
DEF_HELPER_4(lwr, tl, env, tl, tl, int)
|
|
|
|
DEF_HELPER_4(swl, void, env, tl, tl, int)
|
|
|
|
DEF_HELPER_4(swr, void, env, tl, tl, int)
|
2008-06-20 19:12:14 +04:00
|
|
|
|
2009-11-30 17:39:54 +03:00
|
|
|
#ifndef CONFIG_USER_ONLY
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_3(ll, tl, env, tl, int)
|
|
|
|
DEF_HELPER_4(sc, tl, env, tl, tl, int)
|
2009-11-30 17:39:54 +03:00
|
|
|
#ifdef TARGET_MIPS64
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_3(lld, tl, env, tl, int)
|
|
|
|
DEF_HELPER_4(scd, tl, env, tl, tl, int)
|
2009-11-30 17:39:54 +03:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2009-04-06 16:34:07 +04:00
|
|
|
DEF_HELPER_FLAGS_1(clo, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
|
|
|
DEF_HELPER_FLAGS_1(clz, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
2008-06-08 11:42:23 +04:00
|
|
|
#ifdef TARGET_MIPS64
|
2009-04-06 16:34:07 +04:00
|
|
|
DEF_HELPER_FLAGS_1(dclo, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
|
|
|
DEF_HELPER_FLAGS_1(dclz, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl)
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_3(dmult, void, env, tl, tl)
|
|
|
|
DEF_HELPER_3(dmultu, void, env, tl, tl)
|
2008-06-08 11:42:23 +04:00
|
|
|
#endif
|
2008-06-09 11:13:38 +04:00
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_3(muls, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(mulsu, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(macc, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(maccu, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(msac, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(msacu, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(mulhi, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(mulhiu, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(mulshi, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(mulshiu, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(macchi, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(macchiu, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(msachi, tl, env, tl, tl)
|
|
|
|
DEF_HELPER_3(msachiu, tl, env, tl, tl)
|
2008-06-20 18:35:19 +04:00
|
|
|
|
2008-06-09 11:13:38 +04:00
|
|
|
#ifndef CONFIG_USER_ONLY
|
2008-07-23 20:14:22 +04:00
|
|
|
/* CP0 helpers */
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_1(mfc0_mvpcontrol, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_mvpconf0, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_mvpconf1, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_vpecontrol, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_vpeconf0, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_random, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_tcstatus, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_tcstatus, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_tcbind, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_tcbind, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_tcrestart, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_tcrestart, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_tchalt, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_tchalt, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_tccontext, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_tccontext, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_tcschedule, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_tcschedule, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_tcschefback, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_tcschefback, tl, env)
|
|
|
|
DEF_HELPER_1(mfc0_count, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_entryhi, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_status, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_cause, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_epc, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_ebase, tl, env)
|
|
|
|
DEF_HELPER_2(mftc0_configx, tl, env, tl)
|
|
|
|
DEF_HELPER_1(mfc0_lladdr, tl, env)
|
|
|
|
DEF_HELPER_2(mfc0_watchlo, tl, env, i32)
|
|
|
|
DEF_HELPER_2(mfc0_watchhi, tl, env, i32)
|
|
|
|
DEF_HELPER_1(mfc0_debug, tl, env)
|
|
|
|
DEF_HELPER_1(mftc0_debug, tl, env)
|
2008-06-09 11:13:38 +04:00
|
|
|
#ifdef TARGET_MIPS64
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_1(dmfc0_tcrestart, tl, env)
|
|
|
|
DEF_HELPER_1(dmfc0_tchalt, tl, env)
|
|
|
|
DEF_HELPER_1(dmfc0_tccontext, tl, env)
|
|
|
|
DEF_HELPER_1(dmfc0_tcschedule, tl, env)
|
|
|
|
DEF_HELPER_1(dmfc0_tcschefback, tl, env)
|
|
|
|
DEF_HELPER_1(dmfc0_lladdr, tl, env)
|
|
|
|
DEF_HELPER_2(dmfc0_watchlo, tl, env, i32)
|
2008-06-09 11:13:38 +04:00
|
|
|
#endif /* TARGET_MIPS64 */
|
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_2(mtc0_index, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_mvpcontrol, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_vpecontrol, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_vpecontrol, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_vpeconf0, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_vpeconf0, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_vpeconf1, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_yqmask, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_vpeopt, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_entrylo0, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_tcstatus, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_tcstatus, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_tcbind, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_tcbind, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_tcrestart, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_tcrestart, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_tchalt, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_tchalt, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_tccontext, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_tccontext, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_tcschedule, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_tcschedule, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_tcschefback, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_tcschefback, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_entrylo1, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_context, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_pagemask, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_pagegrain, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_wired, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_srsconf0, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_srsconf1, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_srsconf2, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_srsconf3, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_srsconf4, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_hwrena, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_count, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_entryhi, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_entryhi, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_compare, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_status, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_status, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_intctl, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_srsctl, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_cause, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_cause, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_ebase, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_ebase, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_config0, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_config2, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_lladdr, void, env, tl)
|
|
|
|
DEF_HELPER_3(mtc0_watchlo, void, env, tl, i32)
|
|
|
|
DEF_HELPER_3(mtc0_watchhi, void, env, tl, i32)
|
|
|
|
DEF_HELPER_2(mtc0_xcontext, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_framemask, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_debug, void, env, tl)
|
|
|
|
DEF_HELPER_2(mttc0_debug, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_performance0, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_taglo, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_datalo, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_taghi, void, env, tl)
|
|
|
|
DEF_HELPER_2(mtc0_datahi, void, env, tl)
|
2008-06-09 11:13:38 +04:00
|
|
|
|
|
|
|
/* MIPS MT functions */
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_2(mftgpr, tl, env, i32);
|
|
|
|
DEF_HELPER_2(mftlo, tl, env, i32)
|
|
|
|
DEF_HELPER_2(mfthi, tl, env, i32)
|
|
|
|
DEF_HELPER_2(mftacx, tl, env, i32)
|
|
|
|
DEF_HELPER_1(mftdsp, tl, env)
|
|
|
|
DEF_HELPER_3(mttgpr, void, env, tl, i32)
|
|
|
|
DEF_HELPER_3(mttlo, void, env, tl, i32)
|
|
|
|
DEF_HELPER_3(mtthi, void, env, tl, i32)
|
|
|
|
DEF_HELPER_3(mttacx, void, env, tl, i32)
|
|
|
|
DEF_HELPER_2(mttdsp, void, env, tl)
|
2010-10-29 18:48:46 +04:00
|
|
|
DEF_HELPER_0(dmt, tl)
|
|
|
|
DEF_HELPER_0(emt, tl)
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_1(dvpe, tl, env)
|
|
|
|
DEF_HELPER_1(evpe, tl, env)
|
2008-07-23 20:14:22 +04:00
|
|
|
#endif /* !CONFIG_USER_ONLY */
|
2010-06-09 00:29:59 +04:00
|
|
|
|
|
|
|
/* microMIPS functions */
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_4(lwm, void, env, tl, tl, i32);
|
|
|
|
DEF_HELPER_4(swm, void, env, tl, tl, i32);
|
2010-06-09 00:29:59 +04:00
|
|
|
#ifdef TARGET_MIPS64
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_4(ldm, void, env, tl, tl, i32);
|
|
|
|
DEF_HELPER_4(sdm, void, env, tl, tl, i32);
|
2010-06-09 00:29:59 +04:00
|
|
|
#endif
|
|
|
|
|
2008-11-17 17:43:54 +03:00
|
|
|
DEF_HELPER_2(fork, void, tl, tl)
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_2(yield, tl, env, tl)
|
2008-06-09 11:13:38 +04:00
|
|
|
|
|
|
|
/* CP1 functions */
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_2(cfc1, tl, env, i32)
|
|
|
|
DEF_HELPER_3(ctc1, void, env, tl, i32)
|
2008-06-11 19:27:54 +04:00
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_2(float_cvtd_s, i64, env, i32)
|
|
|
|
DEF_HELPER_2(float_cvtd_w, i64, env, i32)
|
|
|
|
DEF_HELPER_2(float_cvtd_l, i64, env, i64)
|
|
|
|
DEF_HELPER_2(float_cvtl_d, i64, env, i64)
|
|
|
|
DEF_HELPER_2(float_cvtl_s, i64, env, i32)
|
|
|
|
DEF_HELPER_2(float_cvtps_pw, i64, env, i64)
|
|
|
|
DEF_HELPER_2(float_cvtpw_ps, i64, env, i64)
|
|
|
|
DEF_HELPER_2(float_cvts_d, i32, env, i64)
|
|
|
|
DEF_HELPER_2(float_cvts_w, i32, env, i32)
|
|
|
|
DEF_HELPER_2(float_cvts_l, i32, env, i64)
|
|
|
|
DEF_HELPER_2(float_cvts_pl, i32, env, i32)
|
|
|
|
DEF_HELPER_2(float_cvts_pu, i32, env, i32)
|
|
|
|
DEF_HELPER_2(float_cvtw_s, i32, env, i32)
|
|
|
|
DEF_HELPER_2(float_cvtw_d, i32, env, i64)
|
2008-07-09 15:05:10 +04:00
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_3(float_addr_ps, i64, env, i64, i64)
|
|
|
|
DEF_HELPER_3(float_mulr_ps, i64, env, i64, i64)
|
2008-07-09 15:05:10 +04:00
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
#define FOP_PROTO(op) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## l_s, i64, env, i32) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## l_d, i64, env, i64) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## w_s, i32, env, i32) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## w_d, i32, env, i64)
|
2008-07-09 15:05:10 +04:00
|
|
|
FOP_PROTO(round)
|
|
|
|
FOP_PROTO(trunc)
|
|
|
|
FOP_PROTO(ceil)
|
|
|
|
FOP_PROTO(floor)
|
|
|
|
#undef FOP_PROTO
|
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
#define FOP_PROTO(op) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## _s, i32, env, i32) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## _d, i64, env, i64)
|
2008-06-19 22:35:02 +04:00
|
|
|
FOP_PROTO(sqrt)
|
2008-06-11 19:27:54 +04:00
|
|
|
FOP_PROTO(rsqrt)
|
|
|
|
FOP_PROTO(recip)
|
|
|
|
#undef FOP_PROTO
|
|
|
|
|
2008-11-17 17:43:54 +03:00
|
|
|
#define FOP_PROTO(op) \
|
|
|
|
DEF_HELPER_1(float_ ## op ## _s, i32, i32) \
|
|
|
|
DEF_HELPER_1(float_ ## op ## _d, i64, i64) \
|
|
|
|
DEF_HELPER_1(float_ ## op ## _ps, i64, i64)
|
2008-07-09 15:05:10 +04:00
|
|
|
FOP_PROTO(abs)
|
|
|
|
FOP_PROTO(chs)
|
2012-09-02 18:52:59 +04:00
|
|
|
#undef FOP_PROTO
|
|
|
|
|
|
|
|
#define FOP_PROTO(op) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## _s, i32, env, i32) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## _d, i64, env, i64) \
|
|
|
|
DEF_HELPER_2(float_ ## op ## _ps, i64, env, i64)
|
2008-07-09 15:05:10 +04:00
|
|
|
FOP_PROTO(recip1)
|
|
|
|
FOP_PROTO(rsqrt1)
|
|
|
|
#undef FOP_PROTO
|
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
#define FOP_PROTO(op) \
|
|
|
|
DEF_HELPER_3(float_ ## op ## _s, i32, env, i32, i32) \
|
|
|
|
DEF_HELPER_3(float_ ## op ## _d, i64, env, i64, i64) \
|
|
|
|
DEF_HELPER_3(float_ ## op ## _ps, i64, env, i64, i64)
|
2008-06-11 19:27:54 +04:00
|
|
|
FOP_PROTO(add)
|
|
|
|
FOP_PROTO(sub)
|
|
|
|
FOP_PROTO(mul)
|
|
|
|
FOP_PROTO(div)
|
2008-07-09 15:05:10 +04:00
|
|
|
FOP_PROTO(recip2)
|
|
|
|
FOP_PROTO(rsqrt2)
|
|
|
|
#undef FOP_PROTO
|
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
#define FOP_PROTO(op) \
|
|
|
|
DEF_HELPER_4(float_ ## op ## _s, i32, env, i32, i32, i32) \
|
|
|
|
DEF_HELPER_4(float_ ## op ## _d, i64, env, i64, i64, i64) \
|
|
|
|
DEF_HELPER_4(float_ ## op ## _ps, i64, env, i64, i64, i64)
|
2008-06-19 22:35:02 +04:00
|
|
|
FOP_PROTO(muladd)
|
|
|
|
FOP_PROTO(mulsub)
|
|
|
|
FOP_PROTO(nmuladd)
|
|
|
|
FOP_PROTO(nmulsub)
|
2008-06-11 19:27:54 +04:00
|
|
|
#undef FOP_PROTO
|
|
|
|
|
2012-09-02 18:52:59 +04:00
|
|
|
#define FOP_PROTO(op) \
|
|
|
|
DEF_HELPER_4(cmp_d_ ## op, void, env, i64, i64, int) \
|
|
|
|
DEF_HELPER_4(cmpabs_d_ ## op, void, env, i64, i64, int) \
|
|
|
|
DEF_HELPER_4(cmp_s_ ## op, void, env, i32, i32, int) \
|
|
|
|
DEF_HELPER_4(cmpabs_s_ ## op, void, env, i32, i32, int) \
|
|
|
|
DEF_HELPER_4(cmp_ps_ ## op, void, env, i64, i64, int) \
|
|
|
|
DEF_HELPER_4(cmpabs_ps_ ## op, void, env, i64, i64, int)
|
2008-06-11 19:27:54 +04:00
|
|
|
FOP_PROTO(f)
|
|
|
|
FOP_PROTO(un)
|
|
|
|
FOP_PROTO(eq)
|
|
|
|
FOP_PROTO(ueq)
|
|
|
|
FOP_PROTO(olt)
|
|
|
|
FOP_PROTO(ult)
|
|
|
|
FOP_PROTO(ole)
|
|
|
|
FOP_PROTO(ule)
|
|
|
|
FOP_PROTO(sf)
|
|
|
|
FOP_PROTO(ngle)
|
|
|
|
FOP_PROTO(seq)
|
|
|
|
FOP_PROTO(ngl)
|
|
|
|
FOP_PROTO(lt)
|
|
|
|
FOP_PROTO(nge)
|
|
|
|
FOP_PROTO(le)
|
|
|
|
FOP_PROTO(ngt)
|
|
|
|
#undef FOP_PROTO
|
2008-06-12 07:15:13 +04:00
|
|
|
|
|
|
|
/* Special functions */
|
2008-07-23 20:14:22 +04:00
|
|
|
#ifndef CONFIG_USER_ONLY
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_1(tlbwi, void, env)
|
|
|
|
DEF_HELPER_1(tlbwr, void, env)
|
|
|
|
DEF_HELPER_1(tlbp, void, env)
|
|
|
|
DEF_HELPER_1(tlbr, void, env)
|
|
|
|
DEF_HELPER_1(di, tl, env)
|
|
|
|
DEF_HELPER_1(ei, tl, env)
|
|
|
|
DEF_HELPER_1(eret, void, env)
|
|
|
|
DEF_HELPER_1(deret, void, env)
|
2008-07-23 20:14:22 +04:00
|
|
|
#endif /* !CONFIG_USER_ONLY */
|
2012-09-02 18:52:59 +04:00
|
|
|
DEF_HELPER_1(rdhwr_cpunum, tl, env)
|
|
|
|
DEF_HELPER_1(rdhwr_synci_step, tl, env)
|
|
|
|
DEF_HELPER_1(rdhwr_cc, tl, env)
|
|
|
|
DEF_HELPER_1(rdhwr_ccres, tl, env)
|
|
|
|
DEF_HELPER_2(pmon, void, env, int)
|
|
|
|
DEF_HELPER_1(wait, void, env)
|
2008-11-17 17:43:54 +03:00
|
|
|
|
2012-09-19 08:59:44 +04:00
|
|
|
/* Loongson multimedia functions. */
|
|
|
|
DEF_HELPER_FLAGS_2(paddsh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(paddush, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(paddh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(paddw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(paddsb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(paddusb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(paddb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(psubsh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psubush, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psubh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psubw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psubsb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psubusb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psubb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(pshufh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(packsswh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(packsshb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(packushb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(punpcklhw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(punpckhhw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(punpcklbh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(punpckhbh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(punpcklwd, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(punpckhwd, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(pavgh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pavgb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pmaxsh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pminsh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pmaxub, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pminub, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(pcmpeqw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pcmpgtw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pcmpeqh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pcmpgth, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pcmpeqb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pcmpgtb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(psllw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psllh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psrlw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psrlh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psraw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(psrah, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(pmullh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pmulhh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pmulhuh, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(pmaddhw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(pasubub, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_1(biadd, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_1(pmovmskb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64)
|
|
|
|
|
2008-11-17 17:43:54 +03:00
|
|
|
#include "def-helper.h"
|