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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-ia64/] [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 _ASM_IA64_BYTEORDER_H
2
#define _ASM_IA64_BYTEORDER_H
3
 
4
/*
5
 * Modified 1998, 1999
6
 *      David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
7
 */
8
 
9
#include <asm/types.h>
10
 
11
static __inline__ __const__ __u64
12
__ia64_swab64 (__u64 x)
13
{
14
        __u64 result;
15
 
16
        __asm__ ("mux1 %0=%1,@rev" : "=r" (result) : "r" (x));
17
        return result;
18
}
19
 
20
static __inline__ __const__ __u32
21
__ia64_swab32 (__u32 x)
22
{
23
        return __ia64_swab64(x) >> 32;
24
}
25
 
26
static __inline__ __const__ __u16
27
__ia64_swab16(__u16 x)
28
{
29
        return __ia64_swab64(x) >> 48;
30
}
31
 
32
#define __arch__swab64(x) __ia64_swab64(x)
33
#define __arch__swab32(x) __ia64_swab32(x)
34
#define __arch__swab16(x) __ia64_swab16(x)
35
 
36
#define __BYTEORDER_HAS_U64__
37
 
38
#include <linux/byteorder/little_endian.h>
39
 
40
#endif /* _ASM_IA64_BYTEORDER_H */

powered by: WebSVN 2.1.0

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