Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Nalimov: bsf/bsr intrinsics implementation still not optimal

Author: Gerd Isenberg

Date: 10:47:31 09/23/04

Go up one level in this thread


On September 23, 2004 at 13:33:44, Eugene Nalimov wrote:

>I worked on IPF/AMD64 implementation. I tried your test case, and here is what I
>got on AMD64 using latest compiler:
>
>PUBLIC	?testbsf@@YAHH@Z				; testbsf
>; Function compile flags: /Ogtpy
>_TEXT	SEGMENT
>mask$ = 8
>?testbsf@@YAHH@Z PROC					; testbsf
>; File c:\repro\w.cpp
>; Line 16
>	xor	eax, eax
>; Line 18
>	test	ecx, ecx
>	mov	r8d, ecx
>	je	SHORT $LN7@testbsf
>	npad	7
>$LL2@testbsf:
>; Line 21
>	bsf	ecx, r8d
>; Line 22
>	mov	edx, 1
>	shl	edx, cl
>; Line 23
>	or	eax, edx
>; Line 24
>	xor	r8d, edx
>	jne	SHORT $LL2@testbsf
>$LN7@testbsf:
>; Line 28
>	ret	0
>?testbsf@@YAHH@Z ENDP					; testbsf
>

Is there a bsf-intrinsic for unsigned __int64 too?




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.