diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2001-07-30 23:51:20 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2001-07-30 23:51:20 +0000 |
commit | 96f4e5135c8fa1361c8e54dfcab4d4132bd68efd (patch) | |
tree | 73f0309c11045570183c82c4e8c8b765041e2932 /libavcodec/i386/cputest.c | |
parent | 0725406c94732dc2ff34fbac26808f76cc9b30d1 (diff) | |
download | ffmpeg-96f4e5135c8fa1361c8e54dfcab4d4132bd68efd.tar.gz |
added external cpuid code to solve -fPIC and gcc unclear constraints problems
Originally committed as revision 25 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/cputest.c')
-rw-r--r-- | libavcodec/i386/cputest.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libavcodec/i386/cputest.c b/libavcodec/i386/cputest.c index 78f36440f1..3de21a708b 100644 --- a/libavcodec/i386/cputest.c +++ b/libavcodec/i386/cputest.c @@ -4,18 +4,8 @@ #include <stdlib.h> #include "../dsputil.h" -/* ebx saving is necessary for PIC. gcc seems unable to see it alone */ -static inline void cpuid(int index, int *eax, int *ebx, int *ecx, int *edx) -{ - asm ("pushl %%ebx\n\t" - "cpuid\n\t" - "movl %%ebx, %1\n\t" - "popl %%ebx\n\t" - : "=a" (*eax), "=m" (*ebx), - "=c" (*ecx), "=d" (*edx) - : "a" (index) - : "cc"); -} +/* need this external function to solve -fPIC ebx issues ! */ +extern void cpuid(int index, int *eax, int *ebx, int *ecx, int *edx); /* Function to test if multimedia instructions are supported... */ int mm_support(void) |