/[gxemul]/trunk/src/include/misc.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/include/misc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 29 by dpavlin, Mon Oct 8 16:19:56 2007 UTC revision 30 by dpavlin, Mon Oct 8 16:20:40 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: misc.h,v 1.241 2006/06/16 18:31:26 debug Exp $   *  $Id: misc.h,v 1.242 2006/07/25 21:03:25 debug Exp $
32   *   *
33   *  Misc. definitions for gxemul.   *  Misc. definitions for gxemul.
34   */   */
# Line 112  struct memory; Line 112  struct memory;
112  #define EMUL_BIG_ENDIAN                 1  #define EMUL_BIG_ENDIAN                 1
113    
114  #ifdef HOST_LITTLE_ENDIAN  #ifdef HOST_LITTLE_ENDIAN
115    #define LE16_TO_HOST(x)     (x)
116    #define BE16_TO_HOST(x)     ((((x) & 0xff00) >> 8) | (((x)&0xff) << 8))
117    #else
118    #define LE16_TO_HOST(x)     ((((x) & 0xff00) >> 8) | (((x)&0xff) << 8))
119    #define BE16_TO_HOST(x)     (x)
120    #endif
121    
122    #ifdef HOST_LITTLE_ENDIAN
123  #define LE32_TO_HOST(x)     (x)  #define LE32_TO_HOST(x)     (x)
124  #define BE32_TO_HOST(x)     ((((x) & 0xff000000) >> 24) | ((x) << 24) | \  #define BE32_TO_HOST(x)     ((((x) & 0xff000000) >> 24) | (((x)&0xff) << 24) | \
125                               (((x) & 0xff0000) >> 8) | (((x) & 0xff00) << 8))                               (((x) & 0xff0000) >> 8) | (((x) & 0xff00) << 8))
126  #else  #else
127  #define LE32_TO_HOST(x)     ((((x) & 0xff000000) >> 24) | ((x) << 24) | \  #define LE32_TO_HOST(x)     ((((x) & 0xff000000) >> 24) | (((x)&0xff) << 24) | \
128                               (((x) & 0xff0000) >> 8) | (((x) & 0xff00) << 8))                               (((x) & 0xff0000) >> 8) | (((x) & 0xff00) << 8))
129  #define BE32_TO_HOST(x)     (x)  #define BE32_TO_HOST(x)     (x)
130  #endif  #endif
131    
132    
133  /*  Debug stuff:  */  /*  Debug stuff:  */
134  #define DEBUG_BUFSIZE           1024  #define DEBUG_BUFSIZE           1024
135  #define DEBUG_INDENTATION       4  #define DEBUG_INDENTATION       4

Legend:
Removed from v.29  
changed lines
  Added in v.30

  ViewVC Help
Powered by ViewVC 1.1.26