]> Git Repo - qemu.git/commitdiff
target-cris: Use clz opcode
authorRichard Henderson <[email protected]>
Wed, 16 Nov 2016 09:54:57 +0000 (10:54 +0100)
committerRichard Henderson <[email protected]>
Tue, 10 Jan 2017 16:06:11 +0000 (08:06 -0800)
Signed-off-by: Richard Henderson <[email protected]>
target/cris/helper.h
target/cris/op_helper.c
target/cris/translate.c

index ff3595641aace5ff4c2f38693ee8a7294c8e2d48..20d21c4358508b5dfc68bdfb24093750013b41aa 100644 (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_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)
index 504303913c6c044fade39f33e9264a698b5c7274..e92505c907ce6b47065acc45282de26d20e2f925 100644 (file)
@@ -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.  */
index b91042743fea95d815d1246b32aa1615b01849b7..0ee05ca02d9ba6c3c0e112bd86f4124f89ad8dfe 100644 (file)
@@ -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);
This page took 0.031865 seconds and 4 git commands to generate.