mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
target-ppc: Use clz and ctz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
555baef8d0
commit
9b8514e56e
3 changed files with 16 additions and 28 deletions
|
@ -141,16 +141,6 @@ uint64_t helper_divde(CPUPPCState *env, uint64_t rau, uint64_t rbu, uint32_t oe)
|
|||
#endif
|
||||
|
||||
|
||||
target_ulong helper_cntlzw(target_ulong t)
|
||||
{
|
||||
return clz32(t);
|
||||
}
|
||||
|
||||
target_ulong helper_cnttzw(target_ulong t)
|
||||
{
|
||||
return ctz32(t);
|
||||
}
|
||||
|
||||
#if defined(TARGET_PPC64)
|
||||
/* if x = 0xab, returns 0xababababababababa */
|
||||
#define pattern(x) (((x) & 0xff) * (~(target_ulong)0 / 0xff))
|
||||
|
@ -174,16 +164,6 @@ uint32_t helper_cmpeqb(target_ulong ra, target_ulong rb)
|
|||
#undef haszero
|
||||
#undef hasvalue
|
||||
|
||||
target_ulong helper_cntlzd(target_ulong t)
|
||||
{
|
||||
return clz64(t);
|
||||
}
|
||||
|
||||
target_ulong helper_cnttzd(target_ulong t)
|
||||
{
|
||||
return ctz64(t);
|
||||
}
|
||||
|
||||
/* Return invalid random number.
|
||||
*
|
||||
* FIXME: Add rng backend or other mechanism to get cryptographically suitable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue