mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-10-28 14:04:39 +08:00
tcg: Use signed integer for tcg_gen_{clz,ctz}i_{i32,i64}
We use signed integers for all other functions, and the sign of the second source is not meaningful here. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
1 parent
9f1966003c
commit
fa2d2ceb90
3 files changed
+10
-10
No files matched your search
@@ -130,8 +130,8 @@ void tcg_gen_plugin_mem_cb(TCGv_i64 addr, unsigned meminfo);
|
||||
/* 32 bit ops */
|
||||
|
||||
void tcg_gen_ctz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
|
||||
void tcg_gen_clzi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint32_t arg2);
|
||||
void tcg_gen_ctzi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint32_t arg2);
|
||||
void tcg_gen_clzi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2);
|
||||
void tcg_gen_ctzi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2);
|
||||
void tcg_gen_clrsb_i32(TCGv_i32 ret, TCGv_i32 arg);
|
||||
void tcg_gen_ctpop_i32(TCGv_i32 a1, TCGv_i32 a2);
|
||||
void tcg_gen_rotl_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
|
||||
@@ -190,8 +190,8 @@ void tcg_gen_st_i32(TCGv_i32 arg1, TCGv_ptr arg2, tcg_target_long offset);
|
||||
/* 64 bit ops */
|
||||
|
||||
void tcg_gen_ctz_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2);
|
||||
void tcg_gen_clzi_i64(TCGv_i64 ret, TCGv_i64 arg1, uint64_t arg2);
|
||||
void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, uint64_t arg2);
|
||||
void tcg_gen_clzi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2);
|
||||
void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2);
|
||||
void tcg_gen_clrsb_i64(TCGv_i64 ret, TCGv_i64 arg);
|
||||
void tcg_gen_ctpop_i64(TCGv_i64 a1, TCGv_i64 a2);
|
||||
void tcg_gen_rotl_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2);
|
||||
|
||||
@@ -1551,7 +1551,7 @@ static bool trans_CMPB(DisasContext *ctx, arg_CMPB *a)
|
||||
}
|
||||
|
||||
static bool do_cntzw(DisasContext *ctx, arg_X_sa_rc *a,
|
||||
void (*helper)(TCGv_i32, TCGv_i32, uint32_t))
|
||||
void (*helper)(TCGv_i32, TCGv_i32, int32_t))
|
||||
{
|
||||
TCGv_i32 t = tcg_temp_new_i32();
|
||||
|
||||
@@ -1567,7 +1567,7 @@ static bool do_cntzw(DisasContext *ctx, arg_X_sa_rc *a,
|
||||
|
||||
#if defined(TARGET_PPC64)
|
||||
static bool do_cntzd(DisasContext *ctx, arg_X_sa_rc *a,
|
||||
void (*helper)(TCGv_i64, TCGv_i64, uint64_t))
|
||||
void (*helper)(TCGv_i64, TCGv_i64, int64_t))
|
||||
{
|
||||
helper(cpu_gpr[a->ra], cpu_gpr[a->rs], 64);
|
||||
if (unlikely(a->rc)) {
|
||||
|
||||
+4
-4
@@ -751,7 +751,7 @@ void tcg_gen_xori(TCGType type, TCGTemp *dst, TCGTemp *src1, int64_t src2)
|
||||
|
||||
/* 32 bit ops */
|
||||
|
||||
void tcg_gen_clzi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint32_t arg2)
|
||||
void tcg_gen_clzi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2)
|
||||
{
|
||||
tcg_gen_clz_i32(ret, arg1, tcg_constant_i32(arg2));
|
||||
}
|
||||
@@ -796,7 +796,7 @@ void tcg_gen_ctz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
|
||||
tcg_temp_free_i32(t);
|
||||
}
|
||||
|
||||
void tcg_gen_ctzi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint32_t arg2)
|
||||
void tcg_gen_ctzi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2)
|
||||
{
|
||||
if (arg2 == 32
|
||||
&& !tcg_op_supported(INDEX_op_ctz, TCG_TYPE_I32, 0)
|
||||
@@ -1672,7 +1672,7 @@ void tcg_gen_revbit64_i64(TCGv_i64 ret, TCGv_i64 arg)
|
||||
}
|
||||
}
|
||||
|
||||
void tcg_gen_clzi_i64(TCGv_i64 ret, TCGv_i64 arg1, uint64_t arg2)
|
||||
void tcg_gen_clzi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2)
|
||||
{
|
||||
tcg_gen_clz_i64(ret, arg1, tcg_constant_i64(arg2));
|
||||
}
|
||||
@@ -1706,7 +1706,7 @@ void tcg_gen_ctz_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2)
|
||||
tcg_temp_free_i64(t);
|
||||
}
|
||||
|
||||
void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, uint64_t arg2)
|
||||
void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2)
|
||||
{
|
||||
if (arg2 == 64
|
||||
&& !tcg_op_supported(INDEX_op_ctz, TCG_TYPE_I64, 0)
|
||||
|
||||
Reference in new issue
Block a user