mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 22:40:05 +00:00
m68k: force inlining bswap functions
This commit is contained in:
parent
9317ea653a
commit
24bb7432a7
@ -1,3 +1,8 @@
|
|||||||
|
2015-01-25 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
|
* sysdeps/m68k/bits/byteswap.h (__bswap_16, __bswap_32)
|
||||||
|
(__bswap_64): Mark as __always_inline.
|
||||||
|
|
||||||
2015-01-25 Bram <bug_rh@spam.wizbit.be>
|
2015-01-25 Bram <bug_rh@spam.wizbit.be>
|
||||||
|
|
||||||
[BZ #15378]
|
[BZ #15378]
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#define __bswap_constant_16(x) \
|
#define __bswap_constant_16(x) \
|
||||||
((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
|
((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
|
||||||
|
|
||||||
static __inline unsigned short int
|
static __always_inline unsigned short int
|
||||||
__bswap_16 (unsigned short int __bsx)
|
__bswap_16 (unsigned short int __bsx)
|
||||||
{
|
{
|
||||||
return __bswap_constant_16 (__bsx);
|
return __bswap_constant_16 (__bsx);
|
||||||
@ -41,7 +41,7 @@ __bswap_16 (unsigned short int __bsx)
|
|||||||
(((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
|
(((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
|
||||||
|
|
||||||
#if !defined(__mcoldfire__)
|
#if !defined(__mcoldfire__)
|
||||||
static __inline unsigned int
|
static __always_inline unsigned int
|
||||||
__bswap_32 (unsigned int __bsx)
|
__bswap_32 (unsigned int __bsx)
|
||||||
{
|
{
|
||||||
if (__builtin_constant_p (__bsx))
|
if (__builtin_constant_p (__bsx))
|
||||||
@ -53,7 +53,7 @@ __bswap_32 (unsigned int __bsx)
|
|||||||
return __bsx;
|
return __bsx;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static __inline unsigned int
|
static __always_inline unsigned int
|
||||||
__bswap_32 (unsigned int __bsx)
|
__bswap_32 (unsigned int __bsx)
|
||||||
{
|
{
|
||||||
return __bswap_constant_32 (__bsx);
|
return __bswap_constant_32 (__bsx);
|
||||||
@ -75,7 +75,7 @@ __bswap_32 (unsigned int __bsx)
|
|||||||
|
|
||||||
/* Swap bytes in 64 bit value. */
|
/* Swap bytes in 64 bit value. */
|
||||||
__extension__
|
__extension__
|
||||||
static __inline unsigned long long
|
static __always_inline unsigned long long
|
||||||
__bswap_64 (unsigned long long __bsx)
|
__bswap_64 (unsigned long long __bsx)
|
||||||
{
|
{
|
||||||
if (__builtin_constant_p (__bsx))
|
if (__builtin_constant_p (__bsx))
|
||||||
|
Loading…
Reference in New Issue
Block a user