Added the Linux byteswap.h header providing bswap_16, bswap_32, and
bswap_64 as macros expanding to __builtin_bswap{16,32,64}. These are
always inlined by the compiler to single instructions.
Follows the existing endian.h / endian-macros.h pattern.
Assisted-by: Automated tooling, human reviewed.
15 lines
277 B
YAML
15 lines
277 B
YAML
header: byteswap.h
|
|
standards:
|
|
- linux
|
|
macros:
|
|
- macro_name: bswap_16
|
|
macro_header: byteswap-macros.h
|
|
- macro_name: bswap_32
|
|
macro_header: byteswap-macros.h
|
|
- macro_name: bswap_64
|
|
macro_header: byteswap-macros.h
|
|
types: []
|
|
enums: []
|
|
objects: []
|
|
functions: []
|