2015-08-21 07:04:50 +00:00
|
|
|
DEF_HELPER_FLAGS_2(div_i32, TCG_CALL_NO_RWG_SE, s32, s32, s32)
|
|
|
|
DEF_HELPER_FLAGS_2(rem_i32, TCG_CALL_NO_RWG_SE, s32, s32, s32)
|
|
|
|
DEF_HELPER_FLAGS_2(divu_i32, TCG_CALL_NO_RWG_SE, i32, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_2(remu_i32, TCG_CALL_NO_RWG_SE, i32, i32, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(div_i64, TCG_CALL_NO_RWG_SE, s64, s64, s64)
|
|
|
|
DEF_HELPER_FLAGS_2(rem_i64, TCG_CALL_NO_RWG_SE, s64, s64, s64)
|
|
|
|
DEF_HELPER_FLAGS_2(divu_i64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(remu_i64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(shl_i64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(shr_i64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(sar_i64, TCG_CALL_NO_RWG_SE, s64, s64, s64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_2(mulsh_i64, TCG_CALL_NO_RWG_SE, s64, s64, s64)
|
|
|
|
DEF_HELPER_FLAGS_2(muluh_i64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
2018-02-27 17:47:33 +00:00
|
|
|
|
2018-03-01 20:53:35 +00:00
|
|
|
DEF_HELPER_FLAGS_2(clz_i32, TCG_CALL_NO_RWG_SE, i32, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_2(ctz_i32, TCG_CALL_NO_RWG_SE, i32, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_2(clz_i64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
|
|
|
DEF_HELPER_FLAGS_2(ctz_i64, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
2018-03-01 23:12:18 +00:00
|
|
|
DEF_HELPER_FLAGS_1(clrsb_i32, TCG_CALL_NO_RWG_SE, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_1(clrsb_i64, TCG_CALL_NO_RWG_SE, i64, i64)
|
2018-03-01 23:21:05 +00:00
|
|
|
DEF_HELPER_FLAGS_1(ctpop_i32, TCG_CALL_NO_RWG_SE, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_1(ctpop_i64, TCG_CALL_NO_RWG_SE, i64, i64)
|
2018-03-01 20:53:35 +00:00
|
|
|
|
2018-03-05 07:13:06 +00:00
|
|
|
DEF_HELPER_FLAGS_1(lookup_tb_ptr, TCG_CALL_NO_WG_SE, ptr, env)
|
2018-03-03 01:56:29 +00:00
|
|
|
|
2018-02-28 02:50:04 +00:00
|
|
|
DEF_HELPER_FLAGS_1(exit_atomic, TCG_CALL_NO_WG, noreturn, env)
|
|
|
|
|
2018-02-27 17:47:33 +00:00
|
|
|
#ifdef CONFIG_SOFTMMU
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_5(atomic_cmpxchgb, TCG_CALL_NO_WG,
|
|
|
|
i32, env, tl, i32, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_5(atomic_cmpxchgw_be, TCG_CALL_NO_WG,
|
|
|
|
i32, env, tl, i32, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_5(atomic_cmpxchgw_le, TCG_CALL_NO_WG,
|
|
|
|
i32, env, tl, i32, i32, i32)
|
2018-02-28 02:50:04 +00:00
|
|
|
DEF_HELPER_FLAGS_5(atomic_cmpxchgl_be, TCG_CALL_NO_WG,
|
|
|
|
i32, env, tl, i32, i32, i32)
|
2018-02-27 17:47:33 +00:00
|
|
|
DEF_HELPER_FLAGS_5(atomic_cmpxchgl_le, TCG_CALL_NO_WG,
|
|
|
|
i32, env, tl, i32, i32, i32)
|
2018-02-28 02:50:04 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_ATOMIC64
|
|
|
|
DEF_HELPER_FLAGS_5(atomic_cmpxchgq_be, TCG_CALL_NO_WG,
|
|
|
|
i64, env, tl, i64, i64, i32)
|
2018-02-27 17:47:33 +00:00
|
|
|
DEF_HELPER_FLAGS_5(atomic_cmpxchgq_le, TCG_CALL_NO_WG,
|
|
|
|
i64, env, tl, i64, i64, i32)
|
2018-02-28 02:50:04 +00:00
|
|
|
#endif
|
2018-02-27 17:47:33 +00:00
|
|
|
|
2018-02-28 02:50:04 +00:00
|
|
|
#ifdef CONFIG_ATOMIC64
|
2018-02-27 17:47:33 +00:00
|
|
|
#define GEN_ATOMIC_HELPERS(NAME) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), b), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), w_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), w_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), l_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), l_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), q_le), \
|
|
|
|
TCG_CALL_NO_WG, i64, env, tl, i64, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), q_be), \
|
|
|
|
TCG_CALL_NO_WG, i64, env, tl, i64, i32)
|
2018-02-28 02:50:04 +00:00
|
|
|
#else
|
|
|
|
#define GEN_ATOMIC_HELPERS(NAME) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), b), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), w_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), w_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), l_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32) \
|
|
|
|
DEF_HELPER_FLAGS_4(glue(glue(atomic_, NAME), l_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32, i32)
|
|
|
|
#endif /* CONFIG_ATOMIC64 */
|
2018-02-27 17:47:33 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(atomic_cmpxchgb, TCG_CALL_NO_WG, i32, env, tl, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(atomic_cmpxchgw_be, TCG_CALL_NO_WG, i32, env, tl, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(atomic_cmpxchgw_le, TCG_CALL_NO_WG, i32, env, tl, i32, i32)
|
2018-02-28 02:50:04 +00:00
|
|
|
DEF_HELPER_FLAGS_4(atomic_cmpxchgl_be, TCG_CALL_NO_WG, i32, env, tl, i32, i32)
|
2018-02-27 17:47:33 +00:00
|
|
|
DEF_HELPER_FLAGS_4(atomic_cmpxchgl_le, TCG_CALL_NO_WG, i32, env, tl, i32, i32)
|
2018-02-28 02:50:04 +00:00
|
|
|
#ifdef CONFIG_ATOMIC64
|
|
|
|
DEF_HELPER_FLAGS_4(atomic_cmpxchgq_be, TCG_CALL_NO_WG, i64, env, tl, i64, i64)
|
2018-02-27 17:47:33 +00:00
|
|
|
DEF_HELPER_FLAGS_4(atomic_cmpxchgq_le, TCG_CALL_NO_WG, i64, env, tl, i64, i64)
|
2018-02-28 02:50:04 +00:00
|
|
|
#endif
|
2018-02-27 17:47:33 +00:00
|
|
|
|
2018-02-28 02:50:04 +00:00
|
|
|
#ifdef CONFIG_ATOMIC64
|
2018-02-27 17:47:33 +00:00
|
|
|
#define GEN_ATOMIC_HELPERS(NAME) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), b), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), w_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), w_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), l_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), l_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), q_le), \
|
|
|
|
TCG_CALL_NO_WG, i64, env, tl, i64) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), q_be), \
|
|
|
|
TCG_CALL_NO_WG, i64, env, tl, i64)
|
2018-02-28 02:50:04 +00:00
|
|
|
#else
|
|
|
|
#define GEN_ATOMIC_HELPERS(NAME) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), b), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), w_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), w_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), l_le), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32) \
|
|
|
|
DEF_HELPER_FLAGS_3(glue(glue(atomic_, NAME), l_be), \
|
|
|
|
TCG_CALL_NO_WG, i32, env, tl, i32)
|
|
|
|
#endif /* CONFIG_ATOMIC64 */
|
2018-02-27 17:47:33 +00:00
|
|
|
|
|
|
|
#endif /* CONFIG_SOFTMMU */
|
|
|
|
|
|
|
|
GEN_ATOMIC_HELPERS(fetch_add)
|
|
|
|
GEN_ATOMIC_HELPERS(fetch_and)
|
|
|
|
GEN_ATOMIC_HELPERS(fetch_or)
|
|
|
|
GEN_ATOMIC_HELPERS(fetch_xor)
|
|
|
|
|
|
|
|
GEN_ATOMIC_HELPERS(add_fetch)
|
|
|
|
GEN_ATOMIC_HELPERS(and_fetch)
|
|
|
|
GEN_ATOMIC_HELPERS(or_fetch)
|
|
|
|
GEN_ATOMIC_HELPERS(xor_fetch)
|
|
|
|
|
|
|
|
GEN_ATOMIC_HELPERS(xchg)
|
|
|
|
|
|
|
|
#undef GEN_ATOMIC_HELPERS
|
2018-03-06 17:19:54 +00:00
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_mov, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_dup8, TCG_CALL_NO_RWG, void, ptr, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_dup16, TCG_CALL_NO_RWG, void, ptr, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_dup32, TCG_CALL_NO_RWG, void, ptr, i32, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_dup64, TCG_CALL_NO_RWG, void, ptr, i32, i64)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_add8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_add16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_add32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_add64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_sub8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_sub16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_sub32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_sub64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_neg8, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_neg16, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_neg32, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_neg64, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_not, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_and, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_or, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_xor, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_andc, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_orc, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
2018-03-06 18:45:25 +00:00
|
|
|
DEF_HELPER_FLAGS_3(gvec_shl8i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_shl16i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_shl32i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_shl64i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_shr8i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_shr16i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_shr32i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_shr64i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_sar8i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_sar16i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_sar32i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_3(gvec_sar64i, TCG_CALL_NO_RWG, void, ptr, ptr, i32)
|
2018-03-06 19:07:42 +00:00
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_eq8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_eq16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_eq32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_eq64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ne8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ne16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ne32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ne64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_lt8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_lt16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_lt32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_lt64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_le8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_le16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_le32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_le64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ltu8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ltu16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ltu32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_ltu64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_leu8, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_leu16, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_leu32, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|
|
|
DEF_HELPER_FLAGS_4(gvec_leu64, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|