⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpu_feat.nas

📁 lame 3.97源码.最好的mp3解码和压缩软件
💻 NAS
字号:
;;; 	assembler routines to detect CPU-features;;	MMX / 3DNow! / SSE / SSE2;;	for the LAME project;	Frank Klemm, Robert Hegemann 2000-10-12;%include "nasm.h"	globaldef	has_MMX_nasm	globaldef	has_3DNow_nasm	globaldef	has_SSE_nasm	globaldef	has_SSE2_nasm        segment_codetestCPUID:	pushfd	                        	pop	eax	mov	ecx,eax	xor	eax,0x200000	push	eax	popfd	pushfd	pop	eax	cmp	eax,ecx	ret;---------------------------------------;	int  has_MMX_nasm (void);---------------------------------------has_MMX_nasm:        pushad	call	testCPUID	jz	return0		; no CPUID command, so no MMX	mov	eax,0x1	CPUID	test	edx,0x800000	jz	return0		; no MMX support	jmp	return1		; MMX support        ;---------------------------------------;	int  has_SSE_nasm (void);---------------------------------------has_SSE_nasm:        pushad	call	testCPUID	jz	return0		; no CPUID command, so no SSE        	mov	eax,0x1	CPUID	test	edx,0x02000000	jz	return0		; no SSE support	jmp	return1		; SSE support        ;---------------------------------------;	int  has_SSE2_nasm (void);---------------------------------------has_SSE2_nasm:        pushad	call	testCPUID	jz	return0		; no CPUID command, so no SSE2        	mov	eax,0x1	CPUID	test	edx,0x04000000	jz	return0		; no SSE2 support	jmp	return1		; SSE2 support        ;---------------------------------------;	int  has_3DNow_nasm (void);---------------------------------------has_3DNow_nasm:        pushad	call	testCPUID	jz	return0		; no CPUID command, so no 3DNow!	mov	eax,0x80000000	CPUID	cmp	eax,0x80000000	jbe	return0		; no extended MSR(1), so no 3DNow!	mov	eax,0x80000001	CPUID	test	edx,0x80000000	jz	return0		; no 3DNow! support				; 3DNow! supportreturn1:	popad	xor	eax,eax	inc	eax	retreturn0:	popad	xor	eax,eax	ret                end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -