target-cris: Use clz opcode

Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Richard Henderson 2016-11-16 10:54:57 +01:00
parent 881549da4b
commit 272694a29d
3 changed files with 1 additions and 7 deletions

View File

@ -7,7 +7,6 @@ DEF_HELPER_1(rfn, void, env)
DEF_HELPER_3(movl_sreg_reg, void, env, i32, i32) DEF_HELPER_3(movl_sreg_reg, void, env, i32, i32)
DEF_HELPER_3(movl_reg_sreg, void, env, i32, i32) DEF_HELPER_3(movl_reg_sreg, void, env, i32, i32)
DEF_HELPER_FLAGS_1(lz, TCG_CALL_NO_SE, i32, i32)
DEF_HELPER_FLAGS_4(btst, TCG_CALL_NO_SE, i32, env, i32, i32, i32) DEF_HELPER_FLAGS_4(btst, TCG_CALL_NO_SE, i32, env, i32, i32, i32)
DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_NO_SE, i32, env, i32, i32, i32) DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_NO_SE, i32, env, i32, i32, i32)

View File

@ -230,11 +230,6 @@ void helper_rfn(CPUCRISState *env)
env->pregs[PR_CCS] |= M_FLAG_V32; env->pregs[PR_CCS] |= M_FLAG_V32;
} }
uint32_t helper_lz(uint32_t t0)
{
return clz32(t0);
}
uint32_t helper_btst(CPUCRISState *env, uint32_t t0, uint32_t t1, uint32_t ccs) uint32_t helper_btst(CPUCRISState *env, uint32_t t0, uint32_t t1, uint32_t ccs)
{ {
/* FIXME: clean this up. */ /* FIXME: clean this up. */

View File

@ -767,7 +767,7 @@ static void cris_alu_op_exec(DisasContext *dc, int op,
t_gen_subx_carry(dc, dst); t_gen_subx_carry(dc, dst);
break; break;
case CC_OP_LZ: case CC_OP_LZ:
gen_helper_lz(dst, b); tcg_gen_clzi_tl(dst, b, TARGET_LONG_BITS);
break; break;
case CC_OP_MULS: case CC_OP_MULS:
tcg_gen_muls2_tl(dst, cpu_PR[PR_MOF], a, b); tcg_gen_muls2_tl(dst, cpu_PR[PR_MOF], a, b);