Changeset 0f718ab in mainline
- Timestamp:
- 2008-04-02T20:09:27Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 711e33fc
- Parents:
- a2aa1dec
- Location:
- kernel
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified kernel/arch/amd64/include/byteorder.h ¶
ra2aa1dec r0f718ab 39 39 40 40 /* AMD64 is little-endian */ 41 #define uint16_t_le2host(n) (n) 41 42 #define uint32_t_le2host(n) (n) 42 43 #define uint64_t_le2host(n) (n) 43 44 45 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 44 46 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 45 47 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) -
TabularUnified kernel/arch/arm32/include/byteorder.h ¶
ra2aa1dec r0f718ab 41 41 #ifdef BIG_ENDIAN 42 42 43 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 43 44 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 44 45 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 45 46 47 #define uint16_t_be2host(n) (n) 46 48 #define uint32_t_be2host(n) (n) 47 49 #define uint64_t_be2host(n) (n) … … 49 51 #else 50 52 53 #define uint16_t_le2host(n) (n) 51 54 #define uint32_t_le2host(n) (n) 52 55 #define uint64_t_le2host(n) (n) 53 56 57 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 54 58 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 55 59 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) -
TabularUnified kernel/arch/ia32/include/byteorder.h ¶
ra2aa1dec r0f718ab 39 39 40 40 /* IA-32 is little-endian */ 41 #define uint16_t_le2host(n) (n) 41 42 #define uint32_t_le2host(n) (n) 42 43 #define uint64_t_le2host(n) (n) 43 44 45 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 44 46 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 45 47 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) -
TabularUnified kernel/arch/ia64/include/byteorder.h ¶
ra2aa1dec r0f718ab 39 39 40 40 /* IA-64 is little-endian */ 41 #define uint16_t_le2host(n) (n) 41 42 #define uint32_t_le2host(n) (n) 42 43 #define uint64_t_le2host(n) (n) 43 44 45 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 44 46 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 45 47 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) -
TabularUnified kernel/arch/mips32/include/byteorder.h ¶
ra2aa1dec r0f718ab 40 40 #ifdef BIG_ENDIAN 41 41 42 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 42 43 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 43 44 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 44 45 46 #define uint16_t_be2host(n) (n) 45 47 #define uint32_t_be2host(n) (n) 46 48 #define uint64_t_be2host(n) (n) … … 48 50 #else 49 51 52 #define uint16_t_le2host(n) (n) 50 53 #define uint32_t_le2host(n) (n) 51 54 #define uint64_t_le2host(n) (n) 52 55 56 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 53 57 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 54 58 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) -
TabularUnified kernel/arch/ppc32/include/byteorder.h ¶
ra2aa1dec r0f718ab 38 38 #include <byteorder.h> 39 39 40 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 40 41 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 41 42 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 42 43 44 #define uint16_t_be2host(n) (n) 43 45 #define uint32_t_be2host(n) (n) 44 46 #define uint64_t_be2host(n) (n) -
TabularUnified kernel/arch/ppc64/include/byteorder.h ¶
ra2aa1dec r0f718ab 38 38 #include <byteorder.h> 39 39 40 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 40 41 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 41 42 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 42 43 44 #define uint16_t_be2host(n) (n) 43 45 #define uint32_t_be2host(n) (n) 44 46 #define uint64_t_be2host(n) (n) -
TabularUnified kernel/arch/sparc64/include/byteorder.h ¶
ra2aa1dec r0f718ab 38 38 #include <byteorder.h> 39 39 40 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 40 41 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 41 42 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 42 43 44 #define uint16_t_be2host(n) (n) 43 45 #define uint32_t_be2host(n) (n) 44 46 #define uint64_t_be2host(n) (n) -
TabularUnified kernel/generic/include/byteorder.h ¶
ra2aa1dec r0f718ab 39 39 { 40 40 return ((n & 0xff) << 56) | 41 42 43 44 45 46 47 41 ((n & 0xff00) << 40) | 42 ((n & 0xff0000) << 24) | 43 ((n & 0xff000000LL) << 8) | 44 ((n & 0xff00000000LL) >> 8) | 45 ((n & 0xff0000000000LL) >> 24) | 46 ((n & 0xff000000000000LL) >> 40) | 47 ((n & 0xff00000000000000LL) >> 56); 48 48 } 49 49 … … 51 51 { 52 52 return ((n & 0xff) << 24) | 53 ((n & 0xff00) << 8) | 54 ((n & 0xff0000) >> 8) | 55 ((n & 0xff000000) >> 24); 53 ((n & 0xff00) << 8) | 54 ((n & 0xff0000) >> 8) | 55 ((n & 0xff000000) >> 24); 56 } 57 58 static inline uint16_t uint16_t_byteorder_swap(uint16_t n) 59 { 60 return ((n & 0xff) << 8) | 61 ((n & 0xff00) >> 8); 56 62 } 57 63
Note:
See TracChangeset
for help on using the changeset viewer.