Back to index

glibc  2.9
Defines | Functions
byteswap.h File Reference
#include <bits/wordsize.h>

Go to the source code of this file.

Defines

#define __bswap_constant_16(x)   ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
#define __bswap_constant_32(x)
#define __bswap_constant_64(x)

Functions

static __inline unsigned short int __bswap_16 (unsigned short int __bsx)
static __inline unsigned int __bswap_32 (unsigned int __bsx)
static __inline unsigned long
long int 
__bswap_64 (unsigned long long int __bsx)

Define Documentation

#define __bswap_constant_16 (   x)    ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))

Definition at line 30 of file byteswap.h.

#define __bswap_constant_32 (   x)
Value:
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |                  \
      (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))

Definition at line 75 of file byteswap.h.

#define __bswap_constant_64 (   x)
Value:
((((x)&0xff00000000000000) >> 56) | (((x)&0x00ff000000000000) >> 40) |  \
      (((x)&0x0000ff0000000000) >> 24) | (((x)&0x000000ff00000000) >>  8) |  \
      (((x)&0x00000000ff000000) <<  8) | (((x)&0x0000000000ff0000) << 24) |  \
      (((x)&0x000000000000ff00) << 40) | (((x)&0x00000000000000ff) << 56))

Definition at line 120 of file byteswap.h.


Function Documentation

static __inline unsigned short int __bswap_16 ( unsigned short int  __bsx) [static]

Definition at line 68 of file byteswap.h.

{
  return __bswap_constant_16 (__bsx);
}
static __inline unsigned int __bswap_32 ( unsigned int  __bsx) [static]

Definition at line 113 of file byteswap.h.

{
  return __bswap_constant_32 (__bsx);
}
static __inline unsigned long long int __bswap_64 ( unsigned long long int  __bsx) [static]

Definition at line 152 of file byteswap.h.

{
  return __bswap_constant_64 (__bsx);
}