OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-x86_64/] [byteorder.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _X86_64_BYTEORDER_H
2
#define _X86_64_BYTEORDER_H
3
 
4
#include <asm/types.h>
5
 
6
#ifdef __GNUC__
7
 
8
static __inline__ __const__ __u64 ___arch__swab64(__u64 x)
9
{
10
        __asm__("bswapq %0" : "=r" (x) : "0" (x));
11
        return x;
12
}
13
 
14
static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
15
{
16
        __asm__("bswapl %0" : "=r" (x) : "0" (x));
17
        return x;
18
}
19
 
20
/* Do not define swab16.  Gcc is smart enought to recognize "C" version and
21
   convert it into rotation or exhange.  */
22
 
23
#define __arch__swab32(x) ___arch__swab32(x)
24
#define __arch__swab64(x) ___arch__swab64(x)
25
 
26
#endif /* __GNUC__ */
27
 
28
#define __BYTEORDER_HAS_U64__
29
 
30
#include <linux/byteorder/little_endian.h>
31
 
32
#endif /* _X86_64_BYTEORDER_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.