mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 13:30:52 +00:00
target-s390x: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
9b8514e56e
commit
0f9712b117
@ -70,7 +70,6 @@ DEF_HELPER_FLAGS_4(msdb, TCG_CALL_NO_WG, i64, env, i64, i64, i64)
|
|||||||
DEF_HELPER_FLAGS_3(tceb, TCG_CALL_NO_RWG_SE, i32, env, i64, i64)
|
DEF_HELPER_FLAGS_3(tceb, TCG_CALL_NO_RWG_SE, i32, env, i64, i64)
|
||||||
DEF_HELPER_FLAGS_3(tcdb, TCG_CALL_NO_RWG_SE, i32, env, i64, i64)
|
DEF_HELPER_FLAGS_3(tcdb, TCG_CALL_NO_RWG_SE, i32, env, i64, i64)
|
||||||
DEF_HELPER_FLAGS_4(tcxb, TCG_CALL_NO_RWG_SE, i32, env, i64, i64, i64)
|
DEF_HELPER_FLAGS_4(tcxb, TCG_CALL_NO_RWG_SE, i32, env, i64, i64, i64)
|
||||||
DEF_HELPER_FLAGS_1(clz, TCG_CALL_NO_RWG_SE, i64, i64)
|
|
||||||
DEF_HELPER_FLAGS_2(sqeb, TCG_CALL_NO_WG, i64, env, i64)
|
DEF_HELPER_FLAGS_2(sqeb, TCG_CALL_NO_WG, i64, env, i64)
|
||||||
DEF_HELPER_FLAGS_2(sqdb, TCG_CALL_NO_WG, i64, env, i64)
|
DEF_HELPER_FLAGS_2(sqdb, TCG_CALL_NO_WG, i64, env, i64)
|
||||||
DEF_HELPER_FLAGS_3(sqxb, TCG_CALL_NO_WG, i64, env, i64, i64)
|
DEF_HELPER_FLAGS_3(sqxb, TCG_CALL_NO_WG, i64, env, i64, i64)
|
||||||
|
@ -117,12 +117,6 @@ uint64_t HELPER(divu64)(CPUS390XState *env, uint64_t ah, uint64_t al,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* count leading zeros, for find leftmost one */
|
|
||||||
uint64_t HELPER(clz)(uint64_t v)
|
|
||||||
{
|
|
||||||
return clz64(v);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t HELPER(cvd)(int32_t reg)
|
uint64_t HELPER(cvd)(int32_t reg)
|
||||||
{
|
{
|
||||||
/* positive 0 */
|
/* positive 0 */
|
||||||
|
@ -2249,7 +2249,7 @@ static ExitStatus op_flogr(DisasContext *s, DisasOps *o)
|
|||||||
gen_op_update1_cc_i64(s, CC_OP_FLOGR, o->in2);
|
gen_op_update1_cc_i64(s, CC_OP_FLOGR, o->in2);
|
||||||
|
|
||||||
/* R1 = IN ? CLZ(IN) : 64. */
|
/* R1 = IN ? CLZ(IN) : 64. */
|
||||||
gen_helper_clz(o->out, o->in2);
|
tcg_gen_clzi_i64(o->out, o->in2, 64);
|
||||||
|
|
||||||
/* R1+1 = IN & ~(found bit). Note that we may attempt to shift this
|
/* R1+1 = IN & ~(found bit). Note that we may attempt to shift this
|
||||||
value by 64, which is undefined. But since the shift is 64 iff the
|
value by 64, which is undefined. But since the shift is 64 iff the
|
||||||
|
Loading…
Reference in New Issue
Block a user