Changeset 3156582 in mainline for arch/mips/include/byteorder.h


Ignore:
Timestamp:
2005-09-11T12:48:42Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8e3fb24c
Parents:
8491c48
Message:

Updated symtab so that it works correctly with BE architectures.
Changed compiler for BE MIPS to be mips-sgi-irix5, because
mipsel -EB does not behave correctly.
Doc updates to amd64.
Added ARC BIOS support to MIPS architecture. Putchar works correctly,
kernel passed FPU & some rwlock tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips/include/byteorder.h

    r8491c48 r3156582  
    3232/* MIPS is little-endian */
    3333#ifdef BIG_ENDIAN
     34static inline __u64 u64_le2host(__u64 n)
     35{
     36        return ((n & 0xff) << 56) |
     37                ((n & 0xff00) << 40) |
     38                ((n & 0xff0000) << 24) |
     39                ((n & 0xff000000LL) << 8) |
     40                ((n & 0xff00000000LL) >>8) |
     41                ((n & 0xff0000000000LL) >> 24) |
     42                ((n & 0xff000000000000LL) >> 40) |
     43                ((n & 0xff00000000000000LL) >> 56);
     44}
     45
    3446static inline __native native_le2host(__native n)
    3547{
     
    4052}
    4153#else
    42 #  define native_le2host(n)             n
     54#  define native_le2host(n)             (n)
     55#  define u64_le2host(n)                (n)
    4356#endif
    4457
Note: See TracChangeset for help on using the changeset viewer.