Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 331 → Rev 332

/SPARTAN/trunk/arch/mips/include/byteorder.h
31,6 → 31,18
 
/* MIPS is little-endian */
#ifdef BIG_ENDIAN
static inline __u64 u64_le2host(__u64 n)
{
return ((n & 0xff) << 56) |
((n & 0xff00) << 40) |
((n & 0xff0000) << 24) |
((n & 0xff000000LL) << 8) |
((n & 0xff00000000LL) >>8) |
((n & 0xff0000000000LL) >> 24) |
((n & 0xff000000000000LL) >> 40) |
((n & 0xff00000000000000LL) >> 56);
}
 
static inline __native native_le2host(__native n)
{
return ((n & 0xff) << 24) |
39,7 → 51,8
((n & 0xff000000) >> 24);
}
#else
# define native_le2host(n) n
# define native_le2host(n) (n)
# define u64_le2host(n) (n)
#endif
 
#endif