target: e2k: Remove type from macro GEN_MASK.

This commit is contained in:
Denis Drakhnia 2020-11-13 11:53:21 +02:00 committed by Denis Drakhnia
parent 3d15ee8026
commit 2f482cf83c
3 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ uint64_t helper_sxt(uint64_t x, uint64_t y)
}
if (x & 4) {
return y & GEN_MASK(uint64_t, 0, size);
return y & GEN_MASK(0, size);
} else {
return (((int64_t) y) << (64 - size) >> (64 - size));
}

View File

@ -8,8 +8,8 @@
#define DYNAMIC_JUMP DISAS_TARGET_1
#define DISAS_CALL DISAS_TARGET_2
#define GEN_MASK(type, start, end) \
((((type) 1 << ((end) - (start) + 1)) - 1) << start)
#define GEN_MASK(start, end) \
(((1UL << ((end) - (start) + 1)) - 1) << start)
#define GET_BIT(v, index) (((v) >> (index)) & 1)
#define GET_FIELD(v, start, end) \
(((v) >> (start)) & ((1 << ((end) - (start) + 1)) - 1))
@ -182,7 +182,7 @@ static inline void e2k_gen_get_field_i64(TCGv_i64 ret, TCGv_i64 val,
{
TCGv_i64 t0 = tcg_temp_new_i64();
tcg_gen_andi_i64(t0, val, GEN_MASK(uint64_t, start, end));
tcg_gen_andi_i64(t0, val, GEN_MASK(start, end));
tcg_gen_shli_i64(ret, t0, start);
tcg_temp_free_i64(t0);
@ -191,7 +191,7 @@ static inline void e2k_gen_get_field_i64(TCGv_i64 ret, TCGv_i64 val,
static inline void e2k_gen_set_field_i64(TCGv_i64 ret, TCGv_i64 val,
uint64_t field, unsigned int start, unsigned int end)
{
uint64_t mask = GEN_MASK(uint64_t, start, end);
uint64_t mask = GEN_MASK(start, end);
TCGv_i64 t0 = tcg_const_i64(~mask);
TCGv_i64 t1 = tcg_const_i64((field << start) & mask);
TCGv_i64 t2 = tcg_temp_new_i64();

View File

@ -432,7 +432,7 @@ static void gen_jmp(DisasContext *dc)
}
TCGv_i64 t0 = tcg_temp_new_i64();
tcg_gen_andi_i64(t0, e2k_cs.ctprs[ctpr], GEN_MASK(uint64_t, 0, 47));
tcg_gen_andi_i64(t0, e2k_cs.ctprs[ctpr], GEN_MASK(0, 47));
tcg_gen_mov_tl(dc->jmp.dest, t0);
tcg_temp_free_i64(t0);