[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-arm] [PATCH v2 33/67] target/arm: Implement SVE r
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [Qemu-arm] [PATCH v2 33/67] target/arm: Implement SVE reverse within elements |
Date: |
Fri, 23 Feb 2018 12:21:00 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/23/2018 07:50 AM, Peter Maydell wrote:
> On 17 February 2018 at 18:22, Richard Henderson
> <address@hidden> wrote:
>> Signed-off-by: Richard Henderson <address@hidden>
>> ---
>> target/arm/helper-sve.h | 14 ++++++++++++++
>> target/arm/sve_helper.c | 41 ++++++++++++++++++++++++++++++++++-------
>> target/arm/translate-sve.c | 38 ++++++++++++++++++++++++++++++++++++++
>> target/arm/sve.decode | 7 +++++++
>> 4 files changed, 93 insertions(+), 7 deletions(-)
>
>> +/* Swap 16-bit words within a 32-bit word. */
>> +static inline uint32_t hswap32(uint32_t h)
>> +{
>> + return rol32(h, 16);
>> +}
>> +
>> +/* Swap 16-bit words within a 64-bit word. */
>> +static inline uint64_t hswap64(uint64_t h)
>> +{
>> + uint64_t m = 0x0000ffff0000ffffull;
>> + h = rol64(h, 32);
>> + return ((h & m) << 16) | ((h >> 16) & m);
>> +}
>> +
>> +/* Swap 32-bit words within a 64-bit word. */
>> +static inline uint64_t wswap64(uint64_t h)
>> +{
>> + return rol64(h, 32);
>> +}
>> +
>
> Were there cases in earlier patches that could have used these? I forget.
No, the earlier patches dealt with bits not bytes.
> I guess they're not useful enough to be worth putting in bswap.h.
Probably not.
>> -static inline uint64_t hswap64(uint64_t h)
>> -{
>> - uint64_t m = 0x0000ffff0000ffffull;
>> - h = rol64(h, 32);
>> - return ((h & m) << 16) | ((h >> 16) & m);
>> -}
>> -
>
> Better to put the function in the right place to start with.
Oops, yes.
r~
- Re: [Qemu-devel] [PATCH v2 28/67] target/arm: Implement SVE Permute - Predicates Group, (continued)
- [Qemu-devel] [PATCH v2 32/67] target/arm: Implement SVE copy to vector (predicated), Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 31/67] target/arm: Implement SVE conditionally broadcast/extract element, Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 35/67] target/arm: Implement SVE Select Vectors Group, Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 33/67] target/arm: Implement SVE reverse within elements, Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 34/67] target/arm: Implement SVE vector splice (predicated), Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 36/67] target/arm: Implement SVE Integer Compare - Vectors Group, Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 37/67] target/arm: Implement SVE Integer Compare - Immediate Group, Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 39/67] target/arm: Implement SVE Predicate Count Group, Richard Henderson, 2018/02/17
- [Qemu-devel] [PATCH v2 38/67] target/arm: Implement SVE Partition Break Group, Richard Henderson, 2018/02/17