--- portab.h 2002/09/22 16:59:57 1.28 +++ portab.h 2002/09/22 18:17:32 1.31 @@ -28,7 +28,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: portab.h,v 1.28 2002/09/22 16:59:57 edgomez Exp $ + * $Id: portab.h,v 1.31 2002/09/22 18:17:32 h Exp $ * ****************************************************************************/ @@ -166,12 +166,7 @@ | msvc x86 specific macros/functions *---------------------------------------------------------------------------*/ # if defined(ARCH_X86) -# define BSWAP(a) - __asm { \ - mov eax,a \ - bswap eax \ - mov a, eax \ - } +# define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax # define EMMS() __asm {emms} static __inline int64_t read_counter(void) @@ -227,14 +222,10 @@ # endif /* _DEBUG */ -# ifdef _DEBUG -# define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ - type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ - type * name = (type *) (((ptr_t) name##_storage+(alignment - 1)) & ~((ptr_t)(alignment)-1)) -# else -# define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ - __attribute__ ((__aligned__(CACHE_LINE))) type name[(sizex)*(sizey)] -# endif + +# define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ + type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ + type * name = (type *) (((ptr_t) name##_storage+(alignment - 1)) & ~((ptr_t)(alignment)-1)) /*---------------------------------------------------------------------------- | gcc x86 specific macros/functions @@ -304,7 +295,7 @@ *---------------------------------------------------------------------------*/ # elif defined(ARCH_SPARC) # define BSWAP(a) \ - ((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | + ((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) # define EMMS() @@ -318,7 +309,7 @@ *---------------------------------------------------------------------------*/ # elif defined(ARCH_MIPS) # define BSWAP(a) \ - ((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | + ((a) = (((a) & 0xff) << 24) | (((a) & 0xff00) << 8) | \ (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff)) # define EMMS()