diff options
author | Richard Henderson <rth@twiddle.net> | 2016-11-16 10:54:57 +0100 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-01-10 08:06:11 -0800 |
commit | 272694a29dc3ed2ed675e03194d33485a2902f0a (patch) | |
tree | 5cc8851e4a92d41b41f0853c1c7a0a43532edab9 /target | |
parent | 881549da4b58ed1b703823a435b9028c4a8b41d3 (diff) |
target-cris: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target')
-rw-r--r-- | target/cris/helper.h | 1 | ||||
-rw-r--r-- | target/cris/op_helper.c | 5 | ||||
-rw-r--r-- | target/cris/translate.c | 2 |
3 files changed, 1 insertions, 7 deletions
diff --git a/target/cris/helper.h b/target/cris/helper.h index ff3595641a..20d21c4358 100644 --- a/target/cris/helper.h +++ b/target/cris/helper.h @@ -7,7 +7,6 @@ DEF_HELPER_1(rfn, void, env) DEF_HELPER_3(movl_sreg_reg, 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(evaluate_flags_muls, TCG_CALL_NO_SE, i32, env, i32, i32, i32) diff --git a/target/cris/op_helper.c b/target/cris/op_helper.c index 504303913c..e92505c907 100644 --- a/target/cris/op_helper.c +++ b/target/cris/op_helper.c @@ -230,11 +230,6 @@ void helper_rfn(CPUCRISState *env) 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) { /* FIXME: clean this up. */ diff --git a/target/cris/translate.c b/target/cris/translate.c index b91042743f..0ee05ca02d 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -767,7 +767,7 @@ static void cris_alu_op_exec(DisasContext *dc, int op, t_gen_subx_carry(dc, dst); break; case CC_OP_LZ: - gen_helper_lz(dst, b); + tcg_gen_clzi_tl(dst, b, TARGET_LONG_BITS); break; case CC_OP_MULS: tcg_gen_muls2_tl(dst, cpu_PR[PR_MOF], a, b); |