tcg/e2k: fix wrong argument types
This commit is contained in:
parent
cf604aa754
commit
a54831a5a1
|
@ -11,12 +11,6 @@
|
|||
#define E2K_LATENCY_PREP 5
|
||||
#define E2K_LATENCY_PREP_RETURN 6
|
||||
|
||||
#define LIT16_MIN (-32768)
|
||||
#define LIT16_MAX 32767
|
||||
|
||||
#define LIT32_MAX 2147483647
|
||||
#define LIT32_MIN (-LIT32_MAX - 1)
|
||||
|
||||
#ifdef CONFIG_DEBUG_TCG
|
||||
static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
|
||||
"b0",
|
||||
|
@ -347,11 +341,11 @@ static void e2k_encode_literals(Bundle *bundle)
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (val >= LIT16_MIN && val <= LIT16_MAX) {
|
||||
if (val == (int16_t) val) {
|
||||
// TODO: lit16
|
||||
}
|
||||
|
||||
if (val >= LIT32_MIN && val <= LIT32_MAX) {
|
||||
if (val == (int32_t) val) {
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
if (bundle->lts_present[j]) {
|
||||
continue;
|
||||
|
@ -744,7 +738,7 @@ static void e2k_insert_mov(Bundle *bundle, int alc, TCGType type, TCGReg ret, TC
|
|||
}
|
||||
|
||||
static void e2k_insert_movi(Bundle *bundle, int alc, TCGReg ret,
|
||||
tcg_target_long val)
|
||||
int64_t val)
|
||||
{
|
||||
e2k_insert_alc_lit(bundle, alc, ALC_MOVD, GPR(ret), 0, val, true, 0);
|
||||
}
|
||||
|
@ -1034,7 +1028,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static bool e2k_insert_setcond(Bundle *bundle, int alc, TCGType type, TCGCond cond, PredReg ret,
|
||||
TCGReg src1, tcg_target_long src2, bool c_src2)
|
||||
TCGReg src1, int64_t src2, bool c_src2)
|
||||
{
|
||||
AlcOpc cmp;
|
||||
bool invert;
|
||||
|
@ -1055,13 +1049,13 @@ static bool e2k_insert_setcond(Bundle *bundle, int alc, TCGType type, TCGCond co
|
|||
}
|
||||
|
||||
static void tcg_out_brcond(TCGContext *s, TCGType type, TCGCond cond, TCGReg src1,
|
||||
TCGArg src2, bool is_const, TCGLabel *l)
|
||||
TCGArg src2, bool c_src2, TCGLabel *l)
|
||||
{
|
||||
Bundle bundle;
|
||||
bool invert;
|
||||
|
||||
tcg_out_start(&bundle);
|
||||
invert = e2k_insert_setcond(&bundle, 0, type, cond, PREG_TMP0, src1, src2, is_const);
|
||||
invert = e2k_insert_setcond(&bundle, 0, type, cond, PREG_TMP0, src1, src2, c_src2);
|
||||
e2k_insert_prep(&bundle, CTPR1, 0);
|
||||
tcg_out_end(s, &bundle);
|
||||
tcg_out_reloc_prep(s, &bundle, l);
|
||||
|
@ -1070,13 +1064,13 @@ static void tcg_out_brcond(TCGContext *s, TCGType type, TCGCond cond, TCGReg src
|
|||
}
|
||||
|
||||
static void tcg_out_setcond(TCGContext *s, TCGType type, TCGCond cond, TCGReg ret,
|
||||
TCGReg src1, tcg_target_long src2, bool is_const)
|
||||
TCGReg src1, TCGArg src2, bool c_src2)
|
||||
{
|
||||
Bundle bundle;
|
||||
bool invert;
|
||||
|
||||
tcg_out_start(&bundle);
|
||||
invert = e2k_insert_setcond(&bundle, 0, type, cond, PREG_TMP0, src1, src2, is_const);
|
||||
invert = e2k_insert_setcond(&bundle, 0, type, cond, PREG_TMP0, src1, src2, c_src2);
|
||||
tcg_out_end(s, &bundle);
|
||||
|
||||
tcg_out_start(&bundle);
|
||||
|
@ -1086,9 +1080,9 @@ static void tcg_out_setcond(TCGContext *s, TCGType type, TCGCond cond, TCGReg re
|
|||
}
|
||||
|
||||
static void tcg_out_movcond(TCGContext *s, TCGType type, TCGCond cond, TCGReg ret,
|
||||
TCGReg cmp1, tcg_target_long cmp2, bool c_cmp2,
|
||||
TCGReg val1, bool c_val1,
|
||||
TCGReg val2, bool c_val2)
|
||||
TCGReg cmp1, TCGArg cmp2, bool c_cmp2,
|
||||
TCGArg val1, bool c_val1,
|
||||
TCGArg val2, bool c_val2)
|
||||
{
|
||||
Bundle bundle;
|
||||
bool inv;
|
||||
|
@ -1107,8 +1101,7 @@ static void tcg_out_movcond(TCGContext *s, TCGType type, TCGCond cond, TCGReg re
|
|||
}
|
||||
|
||||
static void tcg_out_clz_int(TCGContext *s, TCGType type, TCGReg ret,
|
||||
TCGReg a0, tcg_target_long a1, bool c1,
|
||||
bool do_bitrev)
|
||||
TCGReg a0, TCGArg a1, bool c1, bool do_bitrev)
|
||||
{
|
||||
Bundle bundle;
|
||||
AlcOpc cmp, mov, clz, bitrev;
|
||||
|
|
Loading…
Reference in New Issue