mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target-arm: A64: Implement 2-reg-misc CNT, NOT and RBIT
Implement the 2-reg-misc CNT, NOT and RBIT instructions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
94b6c911c6
commit
86cbc418ce
3 changed files with 41 additions and 6 deletions
|
@ -1133,6 +1133,18 @@ uint32_t HELPER(neon_cnt_u8)(uint32_t x)
|
|||
return x;
|
||||
}
|
||||
|
||||
/* Reverse bits in each 8 bit word */
|
||||
uint32_t HELPER(neon_rbit_u8)(uint32_t x)
|
||||
{
|
||||
x = ((x & 0xf0f0f0f0) >> 4)
|
||||
| ((x & 0x0f0f0f0f) << 4);
|
||||
x = ((x & 0x88888888) >> 3)
|
||||
| ((x & 0x44444444) >> 1)
|
||||
| ((x & 0x22222222) << 1)
|
||||
| ((x & 0x11111111) << 3);
|
||||
return x;
|
||||
}
|
||||
|
||||
#define NEON_QDMULH16(dest, src1, src2, round) do { \
|
||||
uint32_t tmp = (int32_t)(int16_t) src1 * (int16_t) src2; \
|
||||
if ((tmp ^ (tmp << 1)) & SIGNBIT) { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue