aboutsummaryrefslogtreecommitdiff
path: root/target/unicore32/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-11-16 11:40:39 +0100
committerRichard Henderson <rth@twiddle.net>2017-01-10 08:06:11 -0800
commit03a733dc62de8bcf85bba59ac2776ed3d4adcbf1 (patch)
tree0d360717bb7680fbb005bbb705c3a5c003f51210 /target/unicore32/translate.c
parent0efa8208544e3e5984d7089ec751d3fbcfd43156 (diff)
target-unicore32: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/unicore32/translate.c')
-rw-r--r--target/unicore32/translate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/unicore32/translate.c b/target/unicore32/translate.c
index 514d460408..666a2016a8 100644
--- a/target/unicore32/translate.c
+++ b/target/unicore32/translate.c
@@ -1479,10 +1479,10 @@ static void do_misc(CPUUniCore32State *env, DisasContext *s, uint32_t insn)
/* clz */
tmp = load_reg(s, UCOP_REG_M);
if (UCOP_SET(26)) {
- gen_helper_clo(tmp, tmp);
- } else {
- gen_helper_clz(tmp, tmp);
+ /* clo */
+ tcg_gen_not_i32(tmp, tmp);
}
+ tcg_gen_clzi_i32(tmp, tmp, 32);
store_reg(s, UCOP_REG_D, tmp);
return;
}