Changeset f3ade6c in mainline for arch/mips/include/byteorder.h
- Timestamp:
- 2005-09-11T15:13:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b3e0738
- Parents:
- 61a9bbe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips/include/byteorder.h
r61a9bbe rf3ade6c 30 30 #define __mips_BYTEORDER_H__ 31 31 32 #include <arch/types.h> 33 #include <byteorder.h> 34 32 35 #ifdef BIG_ENDIAN 33 static inline __u64 u64_le2host(__u64 n)36 static inline __u64 __u64_le2host(__u64 n) 34 37 { 35 return ((n & 0xff) << 56) | 36 ((n & 0xff00) << 40) | 37 ((n & 0xff0000) << 24) | 38 ((n & 0xff000000LL) << 8) | 39 ((n & 0xff00000000LL) >>8) | 40 ((n & 0xff0000000000LL) >> 24) | 41 ((n & 0xff000000000000LL) >> 40) | 42 ((n & 0xff00000000000000LL) >> 56); 38 return __u64_byteorder_swap(n); 43 39 } 44 40 45 static inline __native native_le2host(__native n)41 static inline __native __native_le2host(__native n) 46 42 { 47 return ((n & 0xff) << 24) | 48 ((n & 0xff00) << 8) | 49 ((n & 0xff0000) >> 8) | 50 ((n & 0xff000000) >> 24); 43 return __u32_byteroder_swap(n); 51 44 } 45 52 46 #else 53 # define native_le2host(n) (n)54 # define u64_le2host(n) (n)47 # define __native_le2host(n) (n) 48 # define __u64_le2host(n) (n) 55 49 #endif 56 50
Note:
See TracChangeset
for help on using the changeset viewer.