#include "gen-icount.h"
-static inline void tcg_gen_helper_0_i(void *func, TCGv arg)
+static inline void tcg_gen_helper_0_i(void *func, uint32_t arg)
+
{
TCGv tmp = tcg_const_i32(arg);
tcg_temp_free(tmp);
}
-static inline void tcg_gen_helper_0_ii(void *func, TCGv arg1, TCGv arg2)
+static inline void tcg_gen_helper_0_ii(void *func, uint32_t arg1, uint32_t arg2)
{
TCGv tmp1 = tcg_const_i32(arg1);
TCGv tmp2 = tcg_const_i32(arg2);
tcg_temp_free(tmp2);
}
-static inline void tcg_gen_helper_0_1i(void *func, TCGv arg1, TCGv arg2)
+static inline void tcg_gen_helper_0_1i(void *func, TCGv arg1, uint32_t arg2)
{
TCGv tmp = tcg_const_i32(arg2);
tcg_temp_free(tmp);
}
-static inline void tcg_gen_helper_0_2i(void *func, TCGv arg1, TCGv arg2, TCGv arg3)
+static inline void tcg_gen_helper_0_2i(void *func, TCGv arg1, TCGv arg2, uint32_t arg3)
{
TCGv tmp = tcg_const_i32(arg3);
tcg_temp_free(tmp);
}
-static inline void tcg_gen_helper_0_1ii(void *func, TCGv arg1, TCGv arg2, TCGv arg3)
+static inline void tcg_gen_helper_0_1ii(void *func, TCGv arg1, uint32_t arg2, uint32_t arg3)
{
TCGv tmp1 = tcg_const_i32(arg2);
TCGv tmp2 = tcg_const_i32(arg3);
tcg_temp_free(tmp2);
}
-static inline void tcg_gen_helper_1_i(void *func, TCGv ret, TCGv arg)
+static inline void tcg_gen_helper_1_i(void *func, TCGv ret, uint32_t arg)
{
TCGv tmp = tcg_const_i32(arg);
tcg_temp_free(tmp);
}
-static inline void tcg_gen_helper_1_1i(void *func, TCGv ret, TCGv arg1, TCGv arg2)
+static inline void tcg_gen_helper_1_1i(void *func, TCGv ret, TCGv arg1, uint32_t arg2)
{
TCGv tmp = tcg_const_i32(arg2);
tcg_temp_free(tmp);
}
-static inline void tcg_gen_helper_1_1ii(void *func, TCGv ret, TCGv arg1, TCGv arg2, TCGv arg3)
+static inline void tcg_gen_helper_1_1ii(void *func, TCGv ret, TCGv arg1, uint32_t arg2, uint32_t arg3)
{
TCGv tmp1 = tcg_const_i32(arg2);
TCGv tmp2 = tcg_const_i32(arg3);
tcg_temp_free(tmp2);
}
-static inline void tcg_gen_helper_1_2i(void *func, TCGv ret, TCGv arg1, TCGv arg2, TCGv arg3)
+static inline void tcg_gen_helper_1_2i(void *func, TCGv ret, TCGv arg1, TCGv arg2, uint32_t arg3)
{
TCGv tmp = tcg_const_i32(arg3);
tcg_temp_free(tmp);
}
-static inline void tcg_gen_helper_1_2ii(void *func, TCGv ret, TCGv arg1, TCGv arg2, TCGv arg3, TCGv arg4)
+static inline void tcg_gen_helper_1_2ii(void *func, TCGv ret, TCGv arg1, TCGv arg2, uint32_t arg3, uint32_t arg4)
{
TCGv tmp1 = tcg_const_i32(arg3);
TCGv tmp2 = tcg_const_i32(arg4);
typedef void (fcmp_fun32)(uint32_t, uint32_t, int);
typedef void (fcmp_fun64)(uint64_t, uint64_t, int);
-#define FOP_CONDS(fcmp_fun, type, arg0, arg1, fmt) \
+#define FOP_CONDS(fcmp_fun, type, fmt) \
static fcmp_fun * fcmp ## type ## _ ## fmt ## _table[16] = { \
do_cmp ## type ## _ ## fmt ## _f, \
do_cmp ## type ## _ ## fmt ## _un, \
do_cmp ## type ## _ ## fmt ## _le, \
do_cmp ## type ## _ ## fmt ## _ngt, \
}; \
-static inline void gen_cmp ## type ## _ ## fmt(int n, arg0 a, arg1 b, int cc) \
+static inline void gen_cmp ## type ## _ ## fmt(int n, TCGv a, TCGv b, int cc) \
{ \
tcg_gen_helper_0_2i(fcmp ## type ## _ ## fmt ## _table[n], a, b, cc); \
}
-FOP_CONDS(fcmp_fun64, , uint64_t, uint64_t, d)
-FOP_CONDS(fcmp_fun64, abs, uint64_t, uint64_t, d)
-FOP_CONDS(fcmp_fun32, , uint32_t, uint32_t, s)
-FOP_CONDS(fcmp_fun32, abs, uint32_t, uint32_t, s)
-FOP_CONDS(fcmp_fun64, , uint64_t, uint64_t, ps)
-FOP_CONDS(fcmp_fun64, abs, uint64_t, uint64_t, ps)
+FOP_CONDS(fcmp_fun64, , d)
+FOP_CONDS(fcmp_fun64, abs, d)
+FOP_CONDS(fcmp_fun32, , s)
+FOP_CONDS(fcmp_fun32, abs, s)
+FOP_CONDS(fcmp_fun64, , ps)
+FOP_CONDS(fcmp_fun64, abs, ps)
#undef FOP_CONDS
/* Tests */
{
target_ulong btgt = -1;
int blink = 0;
- int bcond = 0;
+ int bcond_compute = 0;
TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL);
TCGv t1 = tcg_temp_local_new(TCG_TYPE_TL);
if (rs != rt) {
gen_load_gpr(t0, rs);
gen_load_gpr(t1, rt);
- bcond = 1;
+ bcond_compute = 1;
}
btgt = ctx->pc + 4 + offset;
break;
/* Compare to zero */
if (rs != 0) {
gen_load_gpr(t0, rs);
- bcond = 1;
+ bcond_compute = 1;
}
btgt = ctx->pc + 4 + offset;
break;
generate_exception(ctx, EXCP_RI);
goto out;
}
- if (bcond == 0) {
+ if (bcond_compute == 0) {
/* No condition to be computed */
switch (opc) {
case OPC_BEQ: /* rx == rx */
tcg_gen_ld_i32(r_tmp1, current_fpu, offsetof(CPUMIPSFPUContext, fcr31));
tcg_gen_andi_i32(r_tmp1, r_tmp1, ccbit);
tcg_gen_brcondi_i32(cond, r_tmp1, 0, l1);
- tcg_gen_movi_i32(fp1, fp0);
+ tcg_gen_mov_i32(fp1, fp0);
tcg_temp_free(fp0);
gen_set_label(l1);
tcg_temp_free(r_tmp1);
tcg_gen_ld_i32(r_tmp1, current_fpu, offsetof(CPUMIPSFPUContext, fcr31));
tcg_gen_andi_i32(r_tmp1, r_tmp1, ccbit);
tcg_gen_brcondi_i32(cond, r_tmp1, 0, l1);
- tcg_gen_movi_i64(fp1, fp0);
+ tcg_gen_mov_i64(fp1, fp0);
tcg_temp_free(fp0);
gen_set_label(l1);
tcg_temp_free(r_tmp1);
tcg_gen_shri_i32(r_tmp1, r_tmp1, cc);
tcg_gen_andi_i32(r_tmp2, r_tmp1, 0x1);
tcg_gen_brcondi_i32(cond, r_tmp2, 0, l1);
- tcg_gen_movi_i32(fp1, fp0);
+ tcg_gen_mov_i32(fp1, fp0);
tcg_temp_free(fp0);
gen_set_label(l1);
tcg_gen_andi_i32(r_tmp2, r_tmp1, 0x2);
tcg_gen_brcondi_i32(cond, r_tmp2, 0, l2);
- tcg_gen_movi_i32(fph1, fph0);
+ tcg_gen_mov_i32(fph1, fph0);
tcg_temp_free(fph0);
gen_set_label(l2);
tcg_temp_free(r_tmp1);