--- portab.h 2002/03/20 14:02:48 1.4 +++ portab.h 2002/03/21 17:27:06 1.6 @@ -74,7 +74,8 @@ #endif #define CACHE_LINE 16 -#define CACHE_ALIGN +#define CACHE_ALIGN __attribute__ ((__aligned__(CACHE_LINE))) + #if defined(LINUX) @@ -93,10 +94,16 @@ #endif -#define EMMS() __asm__("emms\n\t") // needed for bitstream.h -#define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) +#ifdef ARCH_PPC + #define BSWAP(a) __asm__ ( "lwbrx %0,0,%1; eieio" : "=r" (a) : \ + "r" (&(a)), "m" (a)); + #define EMMS() +#else + #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) + #define EMMS() __asm__("emms\n\t") +#endif // needed for timer.c static __inline int64_t read_counter() {