[cvs] / xvidcore / src / portab.h Repository:
ViewVC logotype

Diff of /xvidcore/src/portab.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28, Sun Sep 22 16:59:57 2002 UTC revision 1.32, Sun Sep 22 19:13:33 2002 UTC
# Line 109  Line 109 
109   *  Some things that are only architecture dependant   *  Some things that are only architecture dependant
110   ****************************************************************************/   ****************************************************************************/
111    
112  #if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_MIPS)  #if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_MIPS)  || defined(ARCH_SPARC)
113  #    define CACHE_LINE  16  #    define CACHE_LINE  16
114  #    define ptr_t uint32_t  #    define ptr_t uint32_t
115  #elif defined(ARCH_IA64) || defined(ARCH_SPARC)  #elif defined(ARCH_IA64)
116  #    define CACHE_LINE  32  #    define CACHE_LINE  32
117  #    define ptr_t uint64_t  #    define ptr_t uint64_t
118  #else  #else
# Line 166  Line 166 
166   | msvc x86 specific macros/functions   | msvc x86 specific macros/functions
167   *---------------------------------------------------------------------------*/   *---------------------------------------------------------------------------*/
168  #    if defined(ARCH_X86)  #    if defined(ARCH_X86)
169  #        define BSWAP(a)  #        define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax
              __asm { \  
                  mov eax,a \  
                  bswap eax \  
                  mov a, eax \  
              }  
170  #        define EMMS() __asm {emms}  #        define EMMS() __asm {emms}
171    
172               static __inline int64_t read_counter(void)               static __inline int64_t read_counter(void)
# Line 227  Line 222 
222  #    endif /* _DEBUG */  #    endif /* _DEBUG */
223    
224    
225  #    ifdef _DEBUG  
226  #        define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \  #        define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \
227                  type name##_storage[(sizex)*(sizey)+(alignment)-1]; \                  type name##_storage[(sizex)*(sizey)+(alignment)-1]; \
228                  type * name = (type *) (((ptr_t) name##_storage+(alignment - 1)) & ~((ptr_t)(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  
229    
230  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
231   | gcc x86 specific macros/functions   | gcc x86 specific macros/functions
# Line 304  Line 295 
295   *---------------------------------------------------------------------------*/   *---------------------------------------------------------------------------*/
296  #    elif defined(ARCH_SPARC)  #    elif defined(ARCH_SPARC)
297  #        define BSWAP(a) \  #        define BSWAP(a) \
298                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) |                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
299                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
300  #        define EMMS()  #        define EMMS()
301    
# Line 318  Line 309 
309   *---------------------------------------------------------------------------*/   *---------------------------------------------------------------------------*/
310  #    elif defined(ARCH_MIPS)  #    elif defined(ARCH_MIPS)
311  #        define BSWAP(a) \  #        define BSWAP(a) \
312                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) |                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
313                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
314  #        define EMMS()  #        define EMMS()
315    

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.32

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4