ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/sysdeps.h
(Generate patch)

Comparing BasiliskII/src/Unix/sysdeps.h (file contents):
Revision 1.14 by cebix, 2000-10-09T17:05:17Z vs.
Revision 1.19 by cebix, 2001-07-06T17:36:08Z

# Line 1 | Line 1
1   /*
2   *  sysdeps.h - System dependent definitions for Unix
3   *
4 < *  Basilisk II (C) 1997-2000 Christian Bauer
4 > *  Basilisk II (C) 1997-2001 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 155 | Line 155 | typedef struct timespec tm_time_t;
155   typedef struct timeval tm_time_t;
156   #endif
157  
158 /* Offset Mac->Unix time in seconds */
159 #define TIME_OFFSET 0x7c25b080
160
158   /* UAE CPU data types */
159   #define uae_s8 int8
160   #define uae_u8 uint8
# Line 236 | Line 233 | static inline void do_put_mem_word(uae_u
233   #else
234   static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); *a = v;}
235   #endif
236 + #define HAVE_OPTIMIZED_BYTESWAP_32
237 + /* bswap doesn't affect condition codes */
238 + static inline uae_u32 do_byteswap_32(uae_u32 v) {__asm__ ("bswap %0" : "=r" (v) : "0" (v)); return v;}
239 + #define HAVE_OPTIMIZED_BYTESWAP_16
240 + #ifdef X86_PPRO_OPT
241 + static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ ("bswapl %0" : "=&r" (v) : "0" (v << 16) : "cc"); return v;}
242 + #else
243 + static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); return v;}
244 + #endif
245  
246   #elif defined(CPU_CAN_ACCESS_UNALIGNED)
247  
# Line 257 | Line 263 | static inline void do_put_mem_word(uae_u
263  
264   #endif /* WORDS_BIGENDIAN */
265  
266 + #ifndef HAVE_OPTIMIZED_BYTESWAP_32
267 + static inline uae_u32 do_byteswap_32(uae_u32 v)
268 +        { return (((v >> 24) & 0xff) | ((v >> 8) & 0xff00) | ((v & 0xff) << 24) | ((v & 0xff00) << 8)); }
269 + #endif
270 +
271 + #ifndef HAVE_OPTIMIZED_BYTESWAP_16
272 + static inline uae_u32 do_byteswap_16(uae_u32 v)
273 +        { return (((v >> 8) & 0xff) | ((v & 0xff) << 8)); }
274 + #endif
275 +
276   #define do_get_mem_byte(a) ((uae_u32)*((uae_u8 *)(a)))
277   #define do_put_mem_byte(a, v) (*(uae_u8 *)(a) = (v))
278  
# Line 270 | Line 286 | static inline void do_put_mem_word(uae_u
286   #define ENUMNAME(name) name
287   #define write_log printf
288  
273 #ifdef USE_COMPILER
274 #define USE_MAPPED_MEMORY
275 #define CAN_MAP_MEMORY
276 #define NO_EXCEPTION_3
277 #define NO_PREFETCH_BUFFER
278 #else
279 #undef USE_MAPPED_MEMORY
280 #undef CAN_MAP_MEMORY
281 #endif
282
289   #ifdef X86_ASSEMBLY
290   #define ASM_SYM_FOR_FUNC(a) __asm__(a)
291   #else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines