Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: GCC and FirstBit()

Author: Robert Hyatt

Date: 11:46:57 10/19/00

Go up one level in this thread


On October 19, 2000 at 14:09:12, Frank Phillips wrote:

>On October 18, 2000 at 17:13:11, Robert Hyatt wrote:
>
>>On October 18, 2000 at 16:13:13, Frank Phillips wrote:
>>
>>>Can anyone point me to a freeware version of Eugene?s FirstBit(), LastBit() and
>>>PopCnt() assembly functions for Linux (gcc), preferably in the form of a
>>>#define for inclusion in a header file.
>>>
>>>Much as I like Linux, my program is about 20 to 30 percent slower under Linux
>>>than it is when compiled with MS VC++ under Windows.
>>>
>>>Profiling shows that the array based lookup to find the first or last bit is
>>>taking most time.
>>>
>>>Frank
>>
>>
>>Why not the one in crafty?  Eugene wrote the .S version...
>
>Enbarassingly, I have never figured out how to get my program to compile with
>x86.s, even though the makefile used to work on an earlier version of gcc.

All you really need to do is compile the .s file separately, which produces
a .o file.  Then use those procedures in your C program calls.  IE there is a
FirstOne(), LastOne() function.  You could change the names in the .s file if
you want, of course.

Then just link that .o file in with your regular C and you should be ready to
rumble...



This page took 0.04 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.