aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/i386/cputest.c
diff options
context:
space:
mode:
authorNick Kurshev <nickols_k@mail.ru>2001-08-08 16:26:51 +0000
committerNick Kurshev <nickols_k@mail.ru>2001-08-08 16:26:51 +0000
commitc10e9f70c0509ee17c5f339672550e610ff82a36 (patch)
tree9ca0ac86315eb2bc369a8bc5a6b872b81ad513a2 /libavcodec/i386/cputest.c
parent16fbebe1731fdcaa36112917cee485120ab02352 (diff)
downloadffmpeg-c10e9f70c0509ee17c5f339672550e610ff82a36.tar.gz
Portability and testing issues
Originally committed as revision 55 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/cputest.c')
-rw-r--r--libavcodec/i386/cputest.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libavcodec/i386/cputest.c b/libavcodec/i386/cputest.c
index 4847bac15d..e8f22dde41 100644
--- a/libavcodec/i386/cputest.c
+++ b/libavcodec/i386/cputest.c
@@ -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 @@ int mm_support(void)
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