mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target-arm: Use new revbit functions
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
652a4b7e73
commit
42fedbca8f
2 changed files with 2 additions and 25 deletions
|
@ -5044,17 +5044,7 @@ uint32_t HELPER(udiv)(uint32_t num, uint32_t den)
|
|||
|
||||
uint32_t HELPER(rbit)(uint32_t x)
|
||||
{
|
||||
x = ((x & 0xff000000) >> 24)
|
||||
| ((x & 0x00ff0000) >> 8)
|
||||
| ((x & 0x0000ff00) << 8)
|
||||
| ((x & 0x000000ff) << 24);
|
||||
x = ((x & 0xf0f0f0f0) >> 4)
|
||||
| ((x & 0x0f0f0f0f) << 4);
|
||||
x = ((x & 0x88888888) >> 3)
|
||||
| ((x & 0x44444444) >> 1)
|
||||
| ((x & 0x22222222) << 1)
|
||||
| ((x & 0x11111111) << 3);
|
||||
return x;
|
||||
return revbit32(x);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue