Mercury Bugs - mercury
View Issue Details
0000445mercuryBugpublic2018-01-24 16:572018-03-19 15:19
Reporterwangp 
Assigned Towangp 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000445: __builtin_bswap16/32 support
DescriptionDetect support for __builtin_bswap{16,32} in configure, or figure out the earliest version of gcc/clang that support those builtins on relevant platforms.

e.g. the builtins are unavailable in gcc 4.2.1 on OpenBSD 6.2 (which is stuck on an old gcc for ideological reasons). It may be that we should only support clang on OpenBSD.
TagsNo tags attached.
Attached Files

Notes
(0000962)
juliensf   
2018-01-24 17:54   
(Last edited: 2018-01-24 17:56)
bswap32 and bswap64 first appeared in GCC 4.3.
bswap16 first appeared in GCC 4.8.

They are *not* listed among the platform specific builtins so I would assume
they are available on all platforms from those versions onward.


Issue History
2018-01-24 16:57wangpNew Issue
2018-01-24 17:54juliensfNote Added: 0000962
2018-01-24 17:56juliensfNote Edited: 0000962bug_revision_view_page.php?bugnote_id=962#r48
2018-02-13 12:55juliensfAssigned To => juliensf
2018-02-13 12:55juliensfStatusnew => assigned
2018-03-19 15:19wangpAssigned Tojuliensf => wangp
2018-03-19 15:19wangpStatusassigned => resolved
2018-03-19 15:19wangpResolutionopen => fixed