[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.11, Fri Mar 29 19:26:19 2002 UTC revision 1.12, Sat Mar 30 00:58:20 2002 UTC
# Line 113  Line 113 
113          #define BSWAP(a) __asm__ ( "lwbrx %0,0,%1; eieio" : "=r" (a) : \          #define BSWAP(a) __asm__ ( "lwbrx %0,0,%1; eieio" : "=r" (a) : \
114                  "r" (&(a)), "m" (a));                  "r" (&(a)), "m" (a));
115          #define EMMS()          #define EMMS()
116    
117            static __inline unsigned long get_tbl(void) {
118                    unsigned long tbl;
119                    asm volatile("mftb %0" : "=r" (tbl));
120                    return tbl;
121            }
122            static __inline unsigned long get_tbu(void) {
123                    unsigned long tbl;
124                    asm volatile("mftbu %0" : "=r" (tbl));
125                    return tbl;
126            }
127            static __inline int64_t read_counter() {
128                    unsigned long tb, tu;
129                    do {
130                            tb = get_tbl();
131                            tu = get_tbu();
132                    } while(tb != get_tbl());
133                    return (((int64_t)tu) << 32) | (int64_t)tb;
134            }
135  #else  #else
136          #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )          #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )
137          #define EMMS() __asm__("emms\n\t")          #define EMMS() __asm__("emms\n\t")

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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