No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / mips / include / endian_machdep.h
blobc7d445b5d9b7ea3045b3d2fdfefef593dc672669
1 /* $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:22 mycroft Exp $ */
3 #ifndef _BYTE_ORDER
4 # error Define MIPS target CPU endian-ness in port-specific header file.
5 #endif
7 #ifdef _LOCORE
9 /*
10 * Endian-independent assembly-code aliases for unaligned memory accesses.
12 #if _BYTE_ORDER == _LITTLE_ENDIAN
13 # define LWHI lwr
14 # define LWLO lwl
15 # define SWHI swr
16 # define SWLO swl
17 # if SZREG == 4
18 # define REG_LHI lwr
19 # define REG_LLO lwl
20 # define REG_SHI swr
21 # define REG_SLO swl
22 # else
23 # define REG_LHI ldr
24 # define REG_LLO ldl
25 # define REG_SHI sdr
26 # define REG_SLO sdl
27 # endif
28 #endif
30 #if _BYTE_ORDER == _BIG_ENDIAN
31 # define LWHI lwl
32 # define LWLO lwr
33 # define SWHI swl
34 # define SWLO swr
35 # if SZREG == 4
36 # define REG_LHI lwl
37 # define REG_LLO lwr
38 # define REG_SHI swl
39 # define REG_SLO swr
40 # else
41 # define REG_LHI ldl
42 # define REG_LLO ldr
43 # define REG_SHI sdl
44 # define REG_SLO sdr
45 # endif
46 #endif
48 #endif /* LOCORE */