Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: IA-64 (Merced) missing bsf & bsr (re: Best way to extract n from 2^n)

Author: Dave Gomboc

Date: 00:04:30 09/20/99

Go up one level in this thread


On September 17, 1999 at 10:14:19, Dave Gomboc wrote:

>On September 17, 1999 at 10:00:47, Brian Richardson wrote:
>
>>On September 16, 1999 at 17:07:08, J. Wesley Cleveland wrote:
>>
>>>On September 15, 1999 at 16:57:30, Brian Richardson wrote:
>>>
>>>>I have looked at Intel's IA64 architecture guide and can't find these
>>>>instructions, although there is a popcnt.  Am I missing something?
>>>
>>>There is a Compute Zero Index, which would allow you to do it in 3 instructions.
>>
>>I saw the czx instructions, but they find the first zero byte (or 2 bytes).
>>How would you use czx to find the first non-zero element?
>>Also, seems like table lookup would still be needed to find the first/last bit
>>set?
>
>xor all of the bits first
>
>Dave

Sorry, I misunderstood the operation that czx performs.  I thought it was acting
as a "find first zero (bit! :-)"

Dave



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.