gnu.cfg: Add support for bswap*() macros.
This commit is contained in:
parent
7832d69edf
commit
5134fefb52
12
cfg/gnu.cfg
12
cfg/gnu.cfg
|
@ -22,6 +22,18 @@
|
|||
<alloc init="false" buffer-size="malloc">pvalloc</alloc>
|
||||
<dealloc>free</dealloc>
|
||||
</memory>
|
||||
<define name="bswap_16(x)" value="((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))"/>
|
||||
<define name="__bswap_constant_16(x)" value="bswap_16(x)"/>
|
||||
<define name="__builtin_bswap16(x)" value="bswap_16(x)"/>
|
||||
<define name="__bswap_16(x)" value="bswap_16(x)"/>
|
||||
<define name="bswap_32(x)" value="((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))"/>
|
||||
<define name="__bswap_constant_32(x)" value="bswap_32(x)"/>
|
||||
<define name="__builtin_bswap32(x)" value="bswap_32(x)"/>
|
||||
<define name="__bswap_32(x)" value="bswap_32(x)"/>
|
||||
<define name="bswap_64(x)" value="((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))"/>
|
||||
<define name="__bswap_constant_64(x)" value="bswap_64(x)"/>
|
||||
<define name="__builtin_bswap64(x)" value="bswap_64(x)"/>
|
||||
<define name="__bswap_64(x)" value="bswap_64(x)"/>
|
||||
<!-- https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html -->
|
||||
<define name="__builtin_alloca(size)" value="alloca(size)"/>
|
||||
<!-- void xexit(int status); -->
|
||||
|
|
Loading…
Reference in New Issue