comparison i386/cputest.c @ 6507:18a7d03d5059 libavcodec

get register names from x86_cpu.h
author mru
date Mon, 17 Mar 2008 23:08:19 +0000
parents 3dc36ec2dcad
children c121e5003fe1
comparison
equal deleted inserted replaced
6506:b495c754c3e1 6507:18a7d03d5059
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */ 21 */
22 22
23 #include <stdlib.h> 23 #include <stdlib.h>
24 #include "dsputil.h" 24 #include "dsputil.h"
25 #include "x86_cpu.h"
25 26
26 #undef printf 27 #undef printf
27
28 #ifdef ARCH_X86_64
29 # define REG_b "rbx"
30 # define REG_S "rsi"
31 #else
32 # define REG_b "ebx"
33 # define REG_S "esi"
34 #endif
35 28
36 /* ebx saving is necessary for PIC. gcc seems unable to see it alone */ 29 /* ebx saving is necessary for PIC. gcc seems unable to see it alone */
37 #define cpuid(index,eax,ebx,ecx,edx)\ 30 #define cpuid(index,eax,ebx,ecx,edx)\
38 asm volatile\ 31 asm volatile\
39 ("mov %%"REG_b", %%"REG_S"\n\t"\ 32 ("mov %%"REG_b", %%"REG_S"\n\t"\