aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-11-21 11:58:25 +0100
committerRichard Henderson <rth@twiddle.net>2017-01-10 08:48:57 -0800
commit79770002207ed0579c47c72cecf97c5d5915b185 (patch)
tree663c2b132d85bfb5fe9df146e8924a2587c57f76 /target/ppc/translate.c
parentde26a584d23b983f4db192a078827abe6dc894ac (diff)
target-ppc: Use ctpop helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/ppc/translate.c')
-rw-r--r--target/ppc/translate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 1224f56be6..121218087f 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -1844,14 +1844,18 @@ static void gen_popcntb(DisasContext *ctx)
static void gen_popcntw(DisasContext *ctx)
{
+#if defined(TARGET_PPC64)
gen_helper_popcntw(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)]);
+#else
+ tcg_gen_ctpop_i32(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)]);
+#endif
}
#if defined(TARGET_PPC64)
/* popcntd: PowerPC 2.06 specification */
static void gen_popcntd(DisasContext *ctx)
{
- gen_helper_popcntd(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)]);
+ tcg_gen_ctpop_i64(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)]);
}
#endif