Revision 96f4e513 libavcodec/i386/cputest.c

View differences:

libavcodec/i386/cputest.c
4 4
#include <stdlib.h>
5 5
#include "../dsputil.h"
6 6

  
7
/* ebx saving is necessary for PIC. gcc seems unable to see it alone */
8
static inline void cpuid(int index, int *eax, int *ebx, int *ecx, int *edx)
9
{
10
    asm ("pushl %%ebx\n\t"
11
         "cpuid\n\t"
12
         "movl %%ebx, %1\n\t"
13
         "popl %%ebx\n\t"
14
         : "=a" (*eax), "=m" (*ebx), 
15
           "=c" (*ecx), "=d" (*edx)
16
         : "a" (index)
17
         : "cc");
18
}
7
/* need this external function to solve -fPIC ebx issues ! */
8
extern void cpuid(int index, int *eax, int *ebx, int *ecx, int *edx);
19 9

  
20 10
/* Function to test if multimedia instructions are supported...  */
21 11
int mm_support(void)

Also available in: Unified diff