Home | History | Annotate | Line # | Download | only in include
endian_machdep.h revision 1.2
      1  1.2     matt /*	$NetBSD: endian_machdep.h,v 1.2 2009/12/14 00:46:04 matt Exp $	*/
      2  1.1  mycroft 
      3  1.1  mycroft #ifndef _BYTE_ORDER
      4  1.1  mycroft # error  Define MIPS target CPU endian-ness in port-specific header file.
      5  1.1  mycroft #endif
      6  1.1  mycroft 
      7  1.1  mycroft #ifdef _LOCORE
      8  1.1  mycroft 
      9  1.1  mycroft /*
     10  1.1  mycroft  *   Endian-independent assembly-code aliases for unaligned memory accesses.
     11  1.1  mycroft  */
     12  1.1  mycroft #if _BYTE_ORDER == _LITTLE_ENDIAN
     13  1.1  mycroft # define LWHI lwr
     14  1.1  mycroft # define LWLO lwl
     15  1.1  mycroft # define SWHI swr
     16  1.1  mycroft # define SWLO swl
     17  1.2     matt # if SZREG == 4
     18  1.2     matt #  define REG_LHI   lwr
     19  1.2     matt #  define REG_LLO   lwl
     20  1.2     matt #  define REG_SHI   swr
     21  1.2     matt #  define REG_SLO   swl
     22  1.2     matt # else
     23  1.2     matt #  define REG_LHI   ldr
     24  1.2     matt #  define REG_LLO   ldl
     25  1.2     matt #  define REG_SHI   sdr
     26  1.2     matt #  define REG_SLO   sdl
     27  1.2     matt # endif
     28  1.1  mycroft #endif
     29  1.1  mycroft 
     30  1.1  mycroft #if _BYTE_ORDER == _BIG_ENDIAN
     31  1.1  mycroft # define LWHI lwl
     32  1.1  mycroft # define LWLO lwr
     33  1.1  mycroft # define SWHI swl
     34  1.1  mycroft # define SWLO swr
     35  1.2     matt # if SZREG == 4
     36  1.2     matt #  define REG_LHI   lwl
     37  1.2     matt #  define REG_LLO   lwr
     38  1.2     matt #  define REG_SHI   swl
     39  1.2     matt #  define REG_SLO   swr
     40  1.2     matt # else
     41  1.2     matt #  define REG_LHI   ldl
     42  1.2     matt #  define REG_LLO   ldr
     43  1.2     matt #  define REG_SHI   sdl
     44  1.2     matt #  define REG_SLO   sdr
     45  1.2     matt # endif
     46  1.1  mycroft #endif
     47  1.1  mycroft 
     48  1.1  mycroft #endif /* LOCORE */
     49