diff i386/cputest.c @ 43:ab64a3fc62bf libavcodec

Portability and testing issues
author nickols_k
date Wed, 08 Aug 2001 16:26:51 +0000
parents c31fb57d17a6
children 718a22dc121f
line wrap: on
line diff
--- a/i386/cputest.c	Tue Aug 07 22:49:50 2001 +0000
+++ b/i386/cputest.c	Wed Aug 08 16:26:51 2001 +0000
@@ -6,13 +6,13 @@
 
 /* ebx saving is necessary for PIC. gcc seems unable to see it alone */
 #define cpuid(index,eax,ebx,ecx,edx)\
-    asm ("movl %%ebx, %%esi\n\t"\
+    __asm __volatile\
+	("movl %%ebx, %%esi\n\t"\
          "cpuid\n\t"\
          "xchgl %%ebx, %%esi"\
          : "=a" (eax), "=S" (ebx),\
            "=c" (ecx), "=d" (edx)\
-         : "0" (index)\
-         : "cc")\
+         : "0" (index));
 
 /* Function to test if multimedia instructions are supported...  */
 int mm_support(void)
@@ -102,3 +102,13 @@
         return 0;
     }
 }
+
+#ifdef __TEST__
+int main ( void )
+{
+  int mm_flags;
+  mm_flags = mm_support();
+  printf("mm_support = 0x%08u\n",mm_flags);
+  return 0;
+}
+#endif