mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
target-ppc: Use ctpop helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
de26a584d2
commit
7977000220
3 changed files with 9 additions and 18 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue