19 |
; * along with this program ; if not, write to the Free Software |
; * along with this program ; if not, write to the Free Software |
20 |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
; * |
; * |
22 |
; * $Id: cpuid.asm,v 1.9 2004-08-29 10:02:38 edgomez Exp $ |
; * $Id: cpuid.asm,v 1.10 2006-12-06 19:55:07 Isibaar Exp $ |
23 |
; * |
; * |
24 |
; ***************************************************************************/ |
; ***************************************************************************/ |
25 |
|
|
51 |
%define CPUID_MMX 0x00800000 |
%define CPUID_MMX 0x00800000 |
52 |
%define CPUID_SSE 0x02000000 |
%define CPUID_SSE 0x02000000 |
53 |
%define CPUID_SSE2 0x04000000 |
%define CPUID_SSE2 0x04000000 |
54 |
|
%define CPUID_SSE3 0x00000001 |
55 |
|
|
56 |
%define EXT_CPUID_3DNOW 0x80000000 |
%define EXT_CPUID_3DNOW 0x80000000 |
57 |
%define EXT_CPUID_AMD_3DNOWEXT 0x40000000 |
%define EXT_CPUID_AMD_3DNOWEXT 0x40000000 |
62 |
%define XVID_CPU_MMXEXT (1<< 1) |
%define XVID_CPU_MMXEXT (1<< 1) |
63 |
%define XVID_CPU_SSE (1<< 2) |
%define XVID_CPU_SSE (1<< 2) |
64 |
%define XVID_CPU_SSE2 (1<< 3) |
%define XVID_CPU_SSE2 (1<< 3) |
65 |
|
%define XVID_CPU_SSE3 (1<< 8) |
66 |
%define XVID_CPU_3DNOW (1<< 4) |
%define XVID_CPU_3DNOW (1<< 4) |
67 |
%define XVID_CPU_3DNOWEXT (1<< 5) |
%define XVID_CPU_3DNOWEXT (1<< 5) |
68 |
%define XVID_CPU_TSC (1<< 6) |
%define XVID_CPU_TSC (1<< 6) |
153 |
; SSE2 support? |
; SSE2 support? |
154 |
CHECK_FEATURE CPUID_SSE2, XVID_CPU_SSE2, ebp |
CHECK_FEATURE CPUID_SSE2, XVID_CPU_SSE2, ebp |
155 |
|
|
156 |
|
; SSE3 support? |
157 |
|
CHECK_FEATURE CPUID_SSE3, XVID_CPU_SSE3, ebp |
158 |
|
|
159 |
; extended functions? |
; extended functions? |
160 |
mov eax, 0x80000000 |
mov eax, 0x80000000 |
161 |
cpuid |
cpuid |