Peter Maydell
b355438de5
bitops.h: Implement half-shuffle and half-unshuffle ops
...
A half-shuffle operation takes a word with zeros in the high half:
0000 0000 0000 0000 ABCD EFGH IJKL MNOP
and spreads the bits out so they are in every other bit of the word:
0A0B 0C0D 0E0F 0G0H 0I0J 0K0L 0M0N 0O0P
A half-unshuffle performs the reverse operation.
Provide functions in bitops.h which implement these operations
for 32-bit and 64-bit inputs, and add tests for them.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1465915112-29272-3-git-send-email-peter.maydell@linaro.org
2016-06-17 15:23:51 +01:00
..
2016-06-07 15:36:54 +03:00
2016-06-08 15:19:30 +08:00
2016-06-07 18:19:24 +03:00
2016-06-16 15:20:37 +02:00
2016-05-18 15:04:27 +03:00
2016-06-11 17:11:16 -07:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-16 09:50:07 +05:30
2016-06-07 18:19:24 +03:00
2016-06-17 12:36:27 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-17 15:57:59 +10:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-17 15:23:51 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 16:34:45 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-13 12:41:17 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:25 +03:00
2016-06-07 18:19:24 +03:00
2016-04-05 11:46:52 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 11:25:06 -05:00
2016-06-16 18:39:03 +02:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 16:34:45 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-17 11:25:46 +01:00
2016-06-17 11:25:46 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00