--- portab.h 2002/09/22 17:25:13 1.29 +++ portab.h 2002/10/19 11:41:11 1.33 @@ -3,7 +3,7 @@ * XVID MPEG-4 VIDEO CODEC * - Portable macros, types and inlined assembly - * - * Copyright(C) 2002 Michael Militzer + * Copyright(C) 2002 Michael Militzer * * This program is an implementation of a part of one or more MPEG-4 * Video tools as specified in ISO/IEC 14496-2 standard. Those intending @@ -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.29 2002/09/22 17:25:13 edgomez Exp $ + * $Id: portab.h,v 1.33 2002/10/19 11:41:11 edgomez Exp $ * ****************************************************************************/ @@ -109,10 +109,10 @@ * Some things that are only architecture dependant ****************************************************************************/ -#if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_MIPS) +#if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_MIPS) || defined(ARCH_SPARC) # define CACHE_LINE 16 # define ptr_t uint32_t -#elif defined(ARCH_IA64) || defined(ARCH_SPARC) +#elif defined(ARCH_IA64) # define CACHE_LINE 32 # define ptr_t uint64_t #else @@ -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) @@ -300,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() @@ -314,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()