[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.23, Sun Jun 30 10:46:29 2002 UTC revision 1.25, Wed Jul 10 15:27:37 2002 UTC
# Line 214  Line 214 
214    
215  #define EMMS()  #define EMMS()
216    
217    #ifdef __GNUC__
218    
219    // needed for bitstream.h
220    #define BSWAP(a)  __asm__ __volatile__ ("mux1 %1 = %0, @rev" \
221                            ";;" \
222                            "shr.u %1 = %1, 32" : "=r" (a) : "r" (a));
223    
224    // rdtsc replacement for ia64
225    static __inline int64_t read_counter() {
226            unsigned long result;
227    
228    //      __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");
229    //      while (__builtin_expect ((int) result == -1, 0))
230                    __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");
231            return result;
232    
233    }
234    
235    /* we are missing our ia64intrin.h file, but according to the
236       Intel's ecc manual, this should be the right way ...
237       this
238    
239    #elif defined(__INTEL_COMPILER)
240    
241    #include <ia64intrin.h>
242    
243    static __inline int64_t read_counter() {
244      return __getReg(44);
245    }
246    
247    #define BSWAP(a) ((unsigned int) (_m64_mux1(a, 0xb) >> 32))
248    */
249    
250    #else
251    
252  // needed for bitstream.h  // needed for bitstream.h
253  #define BSWAP(a) \  #define BSWAP(a) \
254           ((a) = ( ((a)&0xff)<<24) | (((a)&0xff00)<<8) | (((a)>>8)&0xff00) | (((a)>>24)&0xff))           ((a) = ( ((a)&0xff)<<24) | (((a)&0xff00)<<8) | (((a)>>8)&0xff00) | (((a)>>24)&0xff))
255    
256  // rdtsc command most likely not supported,  // rdtsc command most likely not supported,
257  // so just dummy code here  // so just dummy code here
258  static __inline int64_t read_counter() {  static __inline int64_t
259    read_counter()
260    {
261          return 0;          return 0;
262  }  }
263    
264    #endif // gcc or ecc
265    
266  #else  #else
267  #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )  #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )
268  #define EMMS() __asm__("emms\n\t")  #define EMMS() __asm__("emms\n\t")

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.25

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