199 |
# if defined(ARCH_X86) |
# if defined(ARCH_X86) |
200 |
# define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax |
# define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax |
201 |
# define EMMS() __asm {emms} |
# define EMMS() __asm {emms} |
202 |
|
# define FEMMS() __asm {femms} |
203 |
|
|
204 |
static __inline int64_t read_counter(void) |
static __inline int64_t read_counter(void) |
205 |
{ |
{ |
226 |
(((x) & 0x000000ff) << 24)) |
(((x) & 0x000000ff) << 24)) |
227 |
|
|
228 |
#define EMMS() |
#define EMMS() |
229 |
|
#define FEMMS() |
230 |
# endif |
# endif |
231 |
|
|
232 |
|
|
273 |
# if defined(ARCH_X86) |
# if defined(ARCH_X86) |
274 |
# define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ); |
# define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ); |
275 |
# define EMMS() __asm__ ("emms\n\t"); |
# define EMMS() __asm__ ("emms\n\t"); |
276 |
|
# define FEMMS() __asm__ ("femms\n\t"); |
277 |
|
|
278 |
static __inline int64_t read_counter(void) |
static __inline int64_t read_counter(void) |
279 |
{ |
{ |
291 |
# define BSWAP(a) __asm__ __volatile__ \ |
# define BSWAP(a) __asm__ __volatile__ \ |
292 |
( "lwbrx %0,0,%1; eieio" : "=r" (a) : "r" (&(a)), "m" (a)); |
( "lwbrx %0,0,%1; eieio" : "=r" (a) : "r" (&(a)), "m" (a)); |
293 |
# define EMMS() |
# define EMMS() |
294 |
|
# define FEMMS() |
295 |
|
|
296 |
static __inline unsigned long get_tbl(void) |
static __inline unsigned long get_tbl(void) |
297 |
{ |
{ |
325 |
("mux1 %1 = %0, @rev" ";;" \ |
("mux1 %1 = %0, @rev" ";;" \ |
326 |
"shr.u %1 = %1, 32" : "=r" (a) : "r" (a)); |
"shr.u %1 = %1, 32" : "=r" (a) : "r" (a)); |
327 |
# define EMMS() |
# define EMMS() |
328 |
|
# define FEMMS() |
329 |
|
|
330 |
static __inline int64_t read_counter(void) { |
static __inline int64_t read_counter(void) { |
331 |
unsigned long result; |
unsigned long result; |
341 |
((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ |
((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ |
342 |
(((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) |
(((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) |
343 |
# define EMMS() |
# define EMMS() |
344 |
|
# define FEMMS() |
345 |
|
|
346 |
static __inline int64_t read_counter(void) |
static __inline int64_t read_counter(void) |
347 |
{ |
{ |
356 |
((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ |
((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ |
357 |
(((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) |
(((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) |
358 |
# define EMMS() |
# define EMMS() |
359 |
|
# define FEMMS() |
360 |
|
|
361 |
static __inline int64_t read_counter(void) |
static __inline int64_t read_counter(void) |
362 |
{ |
{ |
375 |
(((x) & 0x000000ff) << 24)) |
(((x) & 0x000000ff) << 24)) |
376 |
|
|
377 |
#define EMMS() |
#define EMMS() |
378 |
|
#define FEMMS() |
379 |
# endif /* Architecture checking */ |
# endif /* Architecture checking */ |
380 |
|
|
381 |
/***************************************************************************** |
/***************************************************************************** |