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.13 by gbeauche, 2000-09-22T17:14:46Z vs.
Revision 1.22 by cebix, 2002-02-07T16:10:55Z

# 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-2002 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 69 | Line 69
69  
70   /* Mac ROM is not write protected */
71   #define ROM_IS_WRITE_PROTECTED 0
72 + #define USE_SCRATCHMEM_SUBTERFUGE 1
73  
74   #else
75  
# Line 83 | Line 84
84   /* The m68k emulator uses a prefetch buffer ? */
85   #define USE_PREFETCH_BUFFER 0
86  
87 < /* Mac ROM is write protected */
87 > /* Mac ROM is write protected when banked memory is used */
88   #if REAL_ADDRESSING || DIRECT_ADDRESSING
89   # define ROM_IS_WRITE_PROTECTED 0
90   # define USE_SCRATCHMEM_SUBTERFUGE 1
# Line 102 | Line 103
103   /* ExtFS is supported */
104   #define SUPPORTS_EXTFS 1
105  
106 + /* BSD socket API supported */
107 + #define SUPPORTS_UDP_TUNNEL 1
108 +
109  
110   /* Data types */
111   typedef unsigned char uint8;
# Line 154 | Line 158 | typedef struct timespec tm_time_t;
158   typedef struct timeval tm_time_t;
159   #endif
160  
157 /* Offset Mac->Unix time in seconds */
158 #define TIME_OFFSET 0x7c25b080
159
161   /* UAE CPU data types */
162   #define uae_s8 int8
163   #define uae_u8 uint8
# Line 177 | Line 178 | typedef uae_u32 uaecptr;
178   extern uint64 GetTicks_usec(void);
179   extern void Delay_usec(uint32 usec);
180  
181 + #ifdef HAVE_PTHREADS
182 + /* Centralized pthread attribute setup */
183 + void Set_pthread_attr(pthread_attr_t *attr, int priority);
184 + #endif
185 +
186   /* UAE CPU defines */
187   #ifdef WORDS_BIGENDIAN
188  
# Line 235 | Line 241 | static inline void do_put_mem_word(uae_u
241   #else
242   static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); *a = v;}
243   #endif
244 + #define HAVE_OPTIMIZED_BYTESWAP_32
245 + /* bswap doesn't affect condition codes */
246 + static inline uae_u32 do_byteswap_32(uae_u32 v) {__asm__ ("bswap %0" : "=r" (v) : "0" (v)); return v;}
247 + #define HAVE_OPTIMIZED_BYTESWAP_16
248 + #ifdef X86_PPRO_OPT
249 + static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ ("bswapl %0" : "=&r" (v) : "0" (v << 16) : "cc"); return v;}
250 + #else
251 + static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); return v;}
252 + #endif
253  
254   #elif defined(CPU_CAN_ACCESS_UNALIGNED)
255  
# Line 256 | Line 271 | static inline void do_put_mem_word(uae_u
271  
272   #endif /* WORDS_BIGENDIAN */
273  
274 + #ifndef HAVE_OPTIMIZED_BYTESWAP_32
275 + static inline uae_u32 do_byteswap_32(uae_u32 v)
276 +        { return (((v >> 24) & 0xff) | ((v >> 8) & 0xff00) | ((v & 0xff) << 24) | ((v & 0xff00) << 8)); }
277 + #endif
278 +
279 + #ifndef HAVE_OPTIMIZED_BYTESWAP_16
280 + static inline uae_u32 do_byteswap_16(uae_u32 v)
281 +        { return (((v >> 8) & 0xff) | ((v & 0xff) << 8)); }
282 + #endif
283 +
284   #define do_get_mem_byte(a) ((uae_u32)*((uae_u8 *)(a)))
285   #define do_put_mem_byte(a, v) (*(uae_u8 *)(a) = (v))
286  
# Line 269 | Line 294 | static inline void do_put_mem_word(uae_u
294   #define ENUMNAME(name) name
295   #define write_log printf
296  
272 #ifdef USE_COMPILER
273 #define USE_MAPPED_MEMORY
274 #define CAN_MAP_MEMORY
275 #define NO_EXCEPTION_3
276 #define NO_PREFETCH_BUFFER
277 #else
278 #undef USE_MAPPED_MEMORY
279 #undef CAN_MAP_MEMORY
280 #endif
281
297   #ifdef X86_ASSEMBLY
298   #define ASM_SYM_FOR_FUNC(a) __asm__(a)
299   #else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines