[PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()

Philippe Mathieu-Daudé posted 6 patches 1 year, 1 month ago
include/qemu/bswap.h | 83 ++++++++------------------------------------
meson.build          |  6 ----
2 files changed, 15 insertions(+), 74 deletions(-)
[PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
Implement Richard's suggestion to use __builtin_bswap().

Convert to __builtin_bswap() one patch per OS to simplify
maintainers review.

Since v2:
- Rebased adapting ./configure changes to meson

Since v1:
- Remove the Haiku/BSD ifdef'ry (Peter)
- Include the Haiku VM image from Alexander

Philippe Mathieu-Daudé (6):
  qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
  qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()
  qemu/bswap: Remove <byteswap.h> dependency
  qemu/bswap: Use compiler __builtin_bswap() on Haiku
  qemu/bswap: Use compiler __builtin_bswap() on FreeBSD
  qemu/bswap: Use compiler __builtin_bswap() on NetBSD

 include/qemu/bswap.h | 83 ++++++++------------------------------------
 meson.build          |  6 ----
 2 files changed, 15 insertions(+), 74 deletions(-)

-- 
2.38.1


Re: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()
Posted by Thomas Huth 1 year ago
On 11/01/2023 17.31, Philippe Mathieu-Daudé wrote:
> Implement Richard's suggestion to use __builtin_bswap().
> 
> Convert to __builtin_bswap() one patch per OS to simplify
> maintainers review.
> 
> Since v2:
> - Rebased adapting ./configure changes to meson
> 
> Since v1:
> - Remove the Haiku/BSD ifdef'ry (Peter)
> - Include the Haiku VM image from Alexander
> 
> Philippe Mathieu-Daudé (6):
>    qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
>    qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()
>    qemu/bswap: Remove <byteswap.h> dependency
>    qemu/bswap: Use compiler __builtin_bswap() on Haiku
>    qemu/bswap: Use compiler __builtin_bswap() on FreeBSD
>    qemu/bswap: Use compiler __builtin_bswap() on NetBSD
> 
>   include/qemu/bswap.h | 83 ++++++++------------------------------------
>   meson.build          |  6 ----
>   2 files changed, 15 insertions(+), 74 deletions(-)

Since nobody else picked this up yet, I'll take it for my next pull request. 
Queued to my staging branch now:

  https://gitlab.com/thuth/qemu/-/commits/staging

   Thomas


Re: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()
Posted by Richard Henderson 1 year, 1 month ago
On 1/11/23 08:31, Philippe Mathieu-Daudé wrote:
> Implement Richard's suggestion to use __builtin_bswap().
> 
> Convert to __builtin_bswap() one patch per OS to simplify
> maintainers review.
> 
> Since v2:
> - Rebased adapting ./configure changes to meson
> 
> Since v1:
> - Remove the Haiku/BSD ifdef'ry (Peter)
> - Include the Haiku VM image from Alexander
> 
> Philippe Mathieu-Daudé (6):
>    qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
>    qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()
>    qemu/bswap: Remove <byteswap.h> dependency
>    qemu/bswap: Use compiler __builtin_bswap() on Haiku
>    qemu/bswap: Use compiler __builtin_bswap() on FreeBSD
>    qemu/bswap: Use compiler __builtin_bswap() on NetBSD

If this passes on all the odd OS's, great.
Failure on some oddball is what blocked my patch set years ago.


r~


Re: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
On 13/1/23 02:05, Richard Henderson wrote:
> On 1/11/23 08:31, Philippe Mathieu-Daudé wrote:
>> Implement Richard's suggestion to use __builtin_bswap().
>>
>> Convert to __builtin_bswap() one patch per OS to simplify
>> maintainers review.
>>
>> Since v2:
>> - Rebased adapting ./configure changes to meson
>>
>> Since v1:
>> - Remove the Haiku/BSD ifdef'ry (Peter)
>> - Include the Haiku VM image from Alexander
>>
>> Philippe Mathieu-Daudé (6):
>>    qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
>>    qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()
>>    qemu/bswap: Remove <byteswap.h> dependency
>>    qemu/bswap: Use compiler __builtin_bswap() on Haiku
>>    qemu/bswap: Use compiler __builtin_bswap() on FreeBSD
>>    qemu/bswap: Use compiler __builtin_bswap() on NetBSD
> 
> If this passes on all the odd OS's, great.
> Failure on some oddball is what blocked my patch set years ago.

OK I'll double-check.


Re: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
On 13/1/23 08:05, Philippe Mathieu-Daudé wrote:
> On 13/1/23 02:05, Richard Henderson wrote:
>> On 1/11/23 08:31, Philippe Mathieu-Daudé wrote:
>>> Implement Richard's suggestion to use __builtin_bswap().
>>>
>>> Convert to __builtin_bswap() one patch per OS to simplify
>>> maintainers review.
>>>
>>> Since v2:
>>> - Rebased adapting ./configure changes to meson
>>>
>>> Since v1:
>>> - Remove the Haiku/BSD ifdef'ry (Peter)
>>> - Include the Haiku VM image from Alexander
>>>
>>> Philippe Mathieu-Daudé (6):
>>>    qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
>>>    qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()
>>>    qemu/bswap: Remove <byteswap.h> dependency
>>>    qemu/bswap: Use compiler __builtin_bswap() on Haiku
>>>    qemu/bswap: Use compiler __builtin_bswap() on FreeBSD
>>>    qemu/bswap: Use compiler __builtin_bswap() on NetBSD
>>
>> If this passes on all the odd OS's, great.
>> Failure on some oddball is what blocked my patch set years ago.
> 
> OK I'll double-check.

Tested successfully on:

- QEMU GitLab CI
- Darwin 22.2
- FreeBSD 12.4
- NetBSD 9.3
- OpenBSD 7.2
- Haiku r1beta4

Re: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()
Posted by Richard Henderson 1 year, 1 month ago
On 1/16/23 22:24, Philippe Mathieu-Daudé wrote:
> On 13/1/23 08:05, Philippe Mathieu-Daudé wrote:
>> On 13/1/23 02:05, Richard Henderson wrote:
>>> On 1/11/23 08:31, Philippe Mathieu-Daudé wrote:
>>>> Implement Richard's suggestion to use __builtin_bswap().
>>>>
>>>> Convert to __builtin_bswap() one patch per OS to simplify
>>>> maintainers review.
>>>>
>>>> Since v2:
>>>> - Rebased adapting ./configure changes to meson
>>>>
>>>> Since v1:
>>>> - Remove the Haiku/BSD ifdef'ry (Peter)
>>>> - Include the Haiku VM image from Alexander
>>>>
>>>> Philippe Mathieu-Daudé (6):
>>>>    qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
>>>>    qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()
>>>>    qemu/bswap: Remove <byteswap.h> dependency
>>>>    qemu/bswap: Use compiler __builtin_bswap() on Haiku
>>>>    qemu/bswap: Use compiler __builtin_bswap() on FreeBSD
>>>>    qemu/bswap: Use compiler __builtin_bswap() on NetBSD
>>>
>>> If this passes on all the odd OS's, great.
>>> Failure on some oddball is what blocked my patch set years ago.
>>
>> OK I'll double-check.
> 
> Tested successfully on:
> 
> - QEMU GitLab CI
> - Darwin 22.2
> - FreeBSD 12.4
> - NetBSD 9.3
> - OpenBSD 7.2
> - Haiku r1beta4

Great.  Just in case I missed an individual patch, series:
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

Re: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()
Posted by Thomas Huth 1 year, 1 month ago
On 13/01/2023 08.05, Philippe Mathieu-Daudé wrote:
> On 13/1/23 02:05, Richard Henderson wrote:
>> On 1/11/23 08:31, Philippe Mathieu-Daudé wrote:
>>> Implement Richard's suggestion to use __builtin_bswap().
>>>
>>> Convert to __builtin_bswap() one patch per OS to simplify
>>> maintainers review.
>>>
>>> Since v2:
>>> - Rebased adapting ./configure changes to meson
>>>
>>> Since v1:
>>> - Remove the Haiku/BSD ifdef'ry (Peter)
>>> - Include the Haiku VM image from Alexander
>>>
>>> Philippe Mathieu-Daudé (6):
>>>    qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
>>>    qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap()
>>>    qemu/bswap: Remove <byteswap.h> dependency
>>>    qemu/bswap: Use compiler __builtin_bswap() on Haiku
>>>    qemu/bswap: Use compiler __builtin_bswap() on FreeBSD
>>>    qemu/bswap: Use compiler __builtin_bswap() on NetBSD
>>
>> If this passes on all the odd OS's, great.
>> Failure on some oddball is what blocked my patch set years ago.
> 
> OK I'll double-check.

Please note that "make vm-build-haiku.x86_64" is currently broken - we need 
an update to Beta 4 from Alexander first.

  Thomas