[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.26.2.4, Sat Jan 4 06:14:32 2003 UTC revision 1.26.2.7, Sun Jan 26 05:09:00 2003 UTC
# Line 76  Line 76 
76    
77  /* debug level for this library */  /* debug level for this library */
78  #ifdef _DEBUG  #ifdef _DEBUG
79  #define DPRINTF_LEVEL           (DPRINTF_RC|0x0000000f)  #define DPRINTF_LEVEL           (DPRINTF_RC|0x0000007F)
80  #else  #else
81  #define DPRINTF_LEVEL           DPRINTF_RC  #define DPRINTF_LEVEL           DPRINTF_RC
82  #endif  #endif
# Line 167  Line 167 
167  #include <windows.h>  #include <windows.h>
168  #include <stdio.h>  #include <stdio.h>
169    
170            /* non-ansi function mapping */
171    #       define snprintf _snprintf
172    #       define vsnprintf _vsnprintf
173    
174      /*      /*
175       * This function must be declared/defined all the time because MSVC does       * This function must be declared/defined all the time because MSVC does
176       * not support C99 variable arguments macros       * not support C99 variable arguments macros
# Line 198  Line 202 
202   *---------------------------------------------------------------------------*/   *---------------------------------------------------------------------------*/
203  #    if defined(ARCH_X86)  #    if defined(ARCH_X86)
204  #        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
 #        define EMMS() __asm {emms}  
 #        define FEMMS() __asm {femms}  
205    
206               static __inline int64_t read_counter(void)               static __inline int64_t read_counter(void)
207               {               {
# Line 225  Line 227 
227       (((x) & 0x0000ff00) <<  8) | \       (((x) & 0x0000ff00) <<  8) | \
228       (((x) & 0x000000ff) << 24))       (((x) & 0x000000ff) << 24))
229    
 #define EMMS()  
 #define FEMMS()  
230  #    endif  #    endif
231    
232    
# Line 272  Line 272 
272   *---------------------------------------------------------------------------*/   *---------------------------------------------------------------------------*/
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) );
 #        define EMMS() __asm__ ("emms\n\t");  
 #        define FEMMS() __asm__ ("femms\n\t");  
275    
276           static __inline int64_t read_counter(void)           static __inline int64_t read_counter(void)
277           {           {
# Line 290  Line 288 
288  #    elif defined(ARCH_PPC)  #    elif defined(ARCH_PPC)
289  #        define BSWAP(a) __asm__ __volatile__ \  #        define BSWAP(a) __asm__ __volatile__ \
290                  ( "lwbrx %0,0,%1; eieio" : "=r" (a) : "r" (&(a)), "m" (a));                  ( "lwbrx %0,0,%1; eieio" : "=r" (a) : "r" (&(a)), "m" (a));
 #        define EMMS()  
 #        define FEMMS()  
291    
292           static __inline unsigned long get_tbl(void)           static __inline unsigned long get_tbl(void)
293           {           {
# Line 324  Line 320 
320  #        define BSWAP(a)  __asm__ __volatile__ \  #        define BSWAP(a)  __asm__ __volatile__ \
321                  ("mux1 %1 = %0, @rev" ";;" \                  ("mux1 %1 = %0, @rev" ";;" \
322                   "shr.u %1 = %1, 32" : "=r" (a) : "r" (a));                   "shr.u %1 = %1, 32" : "=r" (a) : "r" (a));
 #        define EMMS()  
 #        define FEMMS()  
323    
324           static __inline int64_t read_counter(void) {           static __inline int64_t read_counter(void) {
325               unsigned long result;               unsigned long result;
# Line 340  Line 334 
334  #        define BSWAP(a) \  #        define BSWAP(a) \
335                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
336                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
 #        define EMMS()  
 #        define FEMMS()  
337    
338           static __inline int64_t read_counter(void)           static __inline int64_t read_counter(void)
339           {           {
# Line 355  Line 347 
347  #        define BSWAP(a) \  #        define BSWAP(a) \
348                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
349                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
 #        define EMMS()  
 #        define FEMMS()  
350    
351           static __inline int64_t read_counter(void)           static __inline int64_t read_counter(void)
352           {           {
# Line 374  Line 364 
364       (((x) & 0x0000ff00) <<  8) | \       (((x) & 0x0000ff00) <<  8) | \
365       (((x) & 0x000000ff) << 24))       (((x) & 0x000000ff) << 24))
366    
 #define EMMS()  
 #define FEMMS()  
367  #    endif /* Architecture checking */  #    endif /* Architecture checking */
368    
369  /*****************************************************************************  /*****************************************************************************

Legend:
Removed from v.1.26.2.4  
changed lines
  Added in v.1.26.2.7

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