Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fast 3DNow! BitScan, one more faster

Author: Gerd Isenberg

Date: 01:11:32 12/02/02

Go up one level in this thread


On December 02, 2002 at 02:49:38, Joel wrote:

>Hey Gerd,
>
>I will try your code out once I get home from work. I am using bsf at the
>moment, (it was marginally faster than my mod 67 idea).
>
>If anyone is interested, my chess engine is slowly progressing, it can play now
>(albeit using a minimax search), has an opening book, transposition table, and s
>simple evalution. Will be implementing internal iterative deepening shortly
>after I have written a few more useful benchmarking utilities for it.
>
>Just wondering though, how do you detect whether a CPU is 3DNow enabled?
>
>Regards,
>Joel


Hi Joel,

As long as my program plays only on my private athlon...

There is the CPUID instruction, see AMD 3DNow! Technology Manual, Feature
Detection...

mov eax,80000000h  ;query for extended functions
CPUID              ;get extended function limit
cmp eax,80000000h  ;is 8000_0001h supported?
jbe NO_EXTENDEDMSR ;if not,3DNow!tech.not supported

mov eax,80000001h  ;setup ext.function 8000_0001h
CPUID              ;call the function
test edx,80000000h ;test bit 31
jnz YES_3DNow!     ;3DNow!technology supported

Gerd



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.