20 |
; * along with this program ; if not, write to the Free Software |
; * along with this program ; if not, write to the Free Software |
21 |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
; * |
; * |
23 |
; * $Id: cpuid.asm,v 1.5 2008-11-11 20:46:24 Isibaar Exp $ |
; * $Id: cpuid.asm,v 1.6 2008-11-14 15:43:27 Isibaar Exp $ |
24 |
; * |
; * |
25 |
; ***************************************************************************/ |
; ***************************************************************************/ |
26 |
|
|
57 |
%define CPUID_SSE 0x02000000 |
%define CPUID_SSE 0x02000000 |
58 |
%define CPUID_SSE2 0x04000000 |
%define CPUID_SSE2 0x04000000 |
59 |
%define CPUID_SSE3 0x00000001 |
%define CPUID_SSE3 0x00000001 |
60 |
|
%define CPUID_SSE41 0x00080000 |
61 |
|
|
62 |
%define EXT_CPUID_3DNOW 0x80000000 |
%define EXT_CPUID_3DNOW 0x80000000 |
63 |
%define EXT_CPUID_AMD_3DNOWEXT 0x40000000 |
%define EXT_CPUID_AMD_3DNOWEXT 0x40000000 |
69 |
%define XVID_CPU_SSE (1<< 2) |
%define XVID_CPU_SSE (1<< 2) |
70 |
%define XVID_CPU_SSE2 (1<< 3) |
%define XVID_CPU_SSE2 (1<< 3) |
71 |
%define XVID_CPU_SSE3 (1<< 8) |
%define XVID_CPU_SSE3 (1<< 8) |
72 |
|
%define XVID_CPU_SSE41 (1<< 9) |
73 |
%define XVID_CPU_3DNOW (1<< 4) |
%define XVID_CPU_3DNOW (1<< 4) |
74 |
%define XVID_CPU_3DNOWEXT (1<< 5) |
%define XVID_CPU_3DNOWEXT (1<< 5) |
75 |
%define XVID_CPU_TSC (1<< 6) |
%define XVID_CPU_TSC (1<< 6) |
154 |
; SSE3 support? |
; SSE3 support? |
155 |
CHECK_FEATURE CPUID_SSE3, XVID_CPU_SSE3, rbp, rcx |
CHECK_FEATURE CPUID_SSE3, XVID_CPU_SSE3, rbp, rcx |
156 |
|
|
157 |
|
; SSE41 support? |
158 |
|
CHECK_FEATURE CPUID_SSE41, XVID_CPU_SSE41, rbp, rcx |
159 |
|
|
160 |
; extended functions? |
; extended functions? |
161 |
mov rax, 0x80000000 |
mov rax, 0x80000000 |
162 |
cpuid |
cpuid |