Changeset f3ade6c in mainline for arch/ppc/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/ppc/include/byteorder.h
r61a9bbe rf3ade6c 31 31 32 32 #include <arch/types.h> 33 #include <byteorder.h> 34 35 static inline __u64 __u64_le2host(__u64 n) 36 { 37 return __u64_byteorder_swap(n); 38 } 39 33 40 34 41 /** Convert little-endian __native to host __native … … 41 48 * 42 49 */ 43 static inline __u64 u64_le2host(__u64 n) 44 { 45 return ((n & 0xff) << 56) | 46 ((n & 0xff00) << 40) | 47 ((n & 0xff0000) << 24) | 48 ((n & 0xff000000LL) << 8) | 49 ((n & 0xff00000000LL) >>8) | 50 ((n & 0xff0000000000LL) >> 24) | 51 ((n & 0xff000000000000LL) >> 40) | 52 ((n & 0xff00000000000000LL) >> 56); 53 } 54 static inline __native native_le2host(__native n) 50 static inline __native __native_le2host(__native n) 55 51 { 56 52 __address v;
Note:
See TracChangeset
for help on using the changeset viewer.