view cpudetect.h @ 28698:c7a1f29c98c2

r27390 Fix a misleading section in the libavcodec options manual r27407 Add video driver for Nintendo Wii/GameCube. r27454 Mention IVTV, S3 and SH_VEU drivers within VIDIX section of manpage. r27466 Document -lavcopts o, aka libavcodec AVOption. r27542 'mp3lame' audio output codec was wrongly listed as 'lame'. r27606 Make -heartbeat-cmd and -stop-xscreensaver sections reference each other. r27638 add lavfopts matroska suboption r27639 document lavc/lavf avoption o suboption r27650 add outdir sub-option to vo png r27690 whitespace cosmetics r27691 vo_fbdev now supports -geometry. r27768 update x264's section with r999 of x264 r27800 improve documentation of latest x264's options r27801 Clarify screenw/screenh options
author kraymer
date Wed, 25 Feb 2009 14:23:07 +0000
parents b089d639e810
children e1b7d9bf263b
line wrap: on
line source

#ifndef MPLAYER_CPUDETECT_H
#define MPLAYER_CPUDETECT_H

#include "config.h"

#define CPUTYPE_I386	3
#define CPUTYPE_I486	4
#define CPUTYPE_I586	5
#define CPUTYPE_I686    6

#if ARCH_X86_64
#  define REGa    rax
#  define REGb    rbx
#  define REGBP   rbp
#  define REGSP   rsp
#  define REG_a  "rax"
#  define REG_b  "rbx"
#  define REG_c  "rcx"
#  define REG_d  "rdx"
#  define REG_S  "rsi"
#  define REG_D  "rdi"
#  define REG_SP "rsp"
#  define REG_BP "rbp"
#else
#  define REGa    eax
#  define REGb    ebx
#  define REGBP   ebp
#  define REGSP   esp
#  define REG_a  "eax"
#  define REG_b  "ebx"
#  define REG_c  "ecx"
#  define REG_d  "edx"
#  define REG_S  "esi"
#  define REG_D  "edi"
#  define REG_SP "esp"
#  define REG_BP "ebp"
#endif

typedef struct cpucaps_s {
	int cpuType;
	int cpuModel;
	int cpuStepping;
	int hasMMX;
	int hasMMX2;
	int has3DNow;
	int has3DNowExt;
	int hasSSE;
	int hasSSE2;
	int hasSSSE3;
	int hasSSE4a;
	int isX86;
	unsigned cl_size; /* size of cache line */
        int hasAltiVec;
	int hasTSC;
} CpuCaps;

extern CpuCaps gCpuCaps;

void GetCpuCaps(CpuCaps *caps);

/* returned value is malloc()'ed so free() it after use */
char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]);

#endif /* MPLAYER_CPUDETECT_H */