Ignore:
Timestamp:
2006-11-30T15:37:16Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c19cf28
Parents:
058b021
Message:

cleanup endian conversion macros

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/include/byteorder.h

    r058b021 rc55dd58  
    3636#define KERN_mips32_BYTEORDER_H_
    3737
    38 #include <arch/types.h>
    3938#include <byteorder.h>
    4039
    4140#ifdef BIG_ENDIAN
    42 static inline uint64_t uint64_t_le2host(uint64_t n)
    43 {
    44         return uint64_t_byteorder_swap(n);
    45 }
    4641
    47 static inline unative_t unative_t_le2host(unative_t n)
    48 {
    49         return uint32_t_byteorder_swap(n);
    50 }
     42#define uint32_t_le2host(n)             uint64_t_byteorder_swap(n)
     43#define uint64_t_le2host(n)             uint32_t_byteorder_swap(n)
     44
     45#define uint32_t_be2host(n)             (n)
     46#define uint64_t_be2host(n)             (n)
    5147
    5248#else
    53 #  define unative_t_le2host(n)          (n)
    54 #  define uint64_t_le2host(n)           (n)
     49
     50#define uint32_t_le2host(n)             (n)
     51#define uint64_t_le2host(n)             (n)
     52
     53#define uint32_t_be2host(n)             uint64_t_byteorder_swap(n)
     54#define uint64_t_be2host(n)             uint32_t_byteorder_swap(n)
     55
    5556#endif
    5657
Note: See TracChangeset for help on using the changeset viewer.