On 13.03.2025 04:29, LIU Hao wrote:
在 2025-3-12 20:42, Jacek Caban 写道:
From: Billy Laws <blaw...@gmail.com>

---
  mingw-w64-crt/misc/winbs_uint64.c | 2 +-
  mingw-w64-crt/misc/winbs_ulong.c  | 5 +++--
  mingw-w64-crt/misc/winbs_ushort.c | 5 +++--
  3 files changed, 7 insertions(+), 5 deletions(-)

Can we use `__builtin_bswap{16,32,64}` in these files now?

GCC 4.3 added `__builtin_bswap32(int32_t x)` and `__builtin_bswap64(int64_t x)`. GCC 4.8 added `__builtin_bswap16(uint16_t x)` and changed the others to unsigned parameters.

For `_byteswap_ushort()`, if compatibility with GCC 4.7- is desired, we can always use `__builtin_bswap32(_Short) >> 16`.


I sent a new version using __builtin_bswap*. I don't know about GCC 4.7 compatibility requirement, hopefully it's not needed anymore. I guess the only way to know for sure is to ignore it and see if anyone notices, we can always bring back a fallback later.


Thanks,

Jacek



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to