79 |
|
#endif |
80 |
|
// Configure PowerPC emulator |
81 |
|
#define PPC_CHECK_INTERRUPTS (ASYNC_IRQ ? 0 : 1) |
82 |
< |
#define PPC_NO_LAZY_PC_UPDATE 1 |
83 |
< |
//#define PPC_NO_DECODE_CACHE 1 |
82 |
> |
#define PPC_DECODE_CACHE 1 |
83 |
|
#define PPC_FLIGHT_RECORDER 1 |
84 |
|
#else |
85 |
|
// Mac ROM is write protected |
131 |
|
#error "Unsupported size of pointer" |
132 |
|
#endif |
133 |
|
|
134 |
< |
// Helper functions to byteswap data |
134 |
> |
/** |
135 |
> |
* Helper functions to byteswap data |
136 |
> |
**/ |
137 |
> |
|
138 |
> |
#if defined(__GNUC__) |
139 |
> |
#if defined(__x86_64__) |
140 |
> |
// Linux/AMD64 currently has no asm optimized bswap_32() in <byteswap.h> |
141 |
> |
#define opt_bswap_32 do_opt_bswap_32 |
142 |
> |
static inline uint32 do_opt_bswap_32(uint32 x) |
143 |
> |
{ |
144 |
> |
uint32 v; |
145 |
> |
__asm__ __volatile__ ("bswap %0" : "=r" (v) : "0" (x)); |
146 |
> |
return v; |
147 |
> |
} |
148 |
> |
#endif |
149 |
> |
#endif |
150 |
> |
|
151 |
|
#ifdef HAVE_BYTESWAP_H |
152 |
|
#include <byteswap.h> |
153 |
|
#endif |
154 |
|
|
155 |
+ |
#ifdef opt_bswap_16 |
156 |
+ |
#undef bswap_16 |
157 |
+ |
#define bswap_16 opt_bswap_16 |
158 |
+ |
#endif |
159 |
|
#ifndef bswap_16 |
160 |
|
#define bswap_16 generic_bswap_16 |
161 |
|
#endif |
165 |
|
return ((x & 0xff) << 8) | ((x >> 8) & 0xff); |
166 |
|
} |
167 |
|
|
168 |
+ |
#ifdef opt_bswap_32 |
169 |
+ |
#undef bswap_32 |
170 |
+ |
#define bswap_32 opt_bswap_32 |
171 |
+ |
#endif |
172 |
|
#ifndef bswap_32 |
173 |
|
#define bswap_32 generic_bswap_32 |
174 |
|
#endif |
181 |
|
((x & 0x000000ff) << 24) ); |
182 |
|
} |
183 |
|
|
184 |
+ |
#ifdef opt_bswap_64 |
185 |
+ |
#undef bswap_64 |
186 |
+ |
#define bswap_64 opt_bswap_64 |
187 |
+ |
#endif |
188 |
|
#ifndef bswap_64 |
189 |
|
#define bswap_64 generic_bswap_64 |
190 |
|
#endif |