summaryrefslogtreecommitdiffstats
path: root/target-arm/helper-a64.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-09-14 13:38:53 -0700
committerRichard Henderson <rth@twiddle.net>2015-09-15 07:45:33 -0700
commit42fedbca8f5b54324ed89be3484d4a3dc9946387 (patch)
treef9d1885009fa39b8495d88cb63b593ad5aa6e084 /target-arm/helper-a64.c
parent652a4b7e736f432a6809d1d2b52d169ab0b9aa3b (diff)
downloadhqemu-42fedbca8f5b54324ed89be3484d4a3dc9946387.zip
hqemu-42fedbca8f5b54324ed89be3484d4a3dc9946387.tar.gz
target-arm: Use new revbit functions
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-arm/helper-a64.c')
-rw-r--r--target-arm/helper-a64.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c
index 2c7a645..deb8dbe 100644
--- a/target-arm/helper-a64.c
+++ b/target-arm/helper-a64.c
@@ -70,20 +70,7 @@ uint32_t HELPER(clz32)(uint32_t x)
uint64_t HELPER(rbit64)(uint64_t x)
{
- /* assign the correct byte position */
- x = bswap64(x);
-
- /* assign the correct nibble position */
- x = ((x & 0xf0f0f0f0f0f0f0f0ULL) >> 4)
- | ((x & 0x0f0f0f0f0f0f0f0fULL) << 4);
-
- /* assign the correct bit position */
- x = ((x & 0x8888888888888888ULL) >> 3)
- | ((x & 0x4444444444444444ULL) >> 1)
- | ((x & 0x2222222222222222ULL) << 1)
- | ((x & 0x1111111111111111ULL) << 3);
-
- return x;
+ return revbit64(x);
}
/* Convert a softfloat float_relation_ (as returned by
OpenPOWER on IntegriCloud