Author: Filip Tvrzsky
Date: 08:48:25 03/29/03
Go up one level in this thread
On March 29, 2003 at 11:01:08, Sune Fischer wrote: >On March 29, 2003 at 09:27:34, Frank Phillips wrote: > >>On March 29, 2003 at 09:00:22, Sune Fischer wrote: >> >>>I'm trying to compile my program with GCC, and the assembler parts are causing >>>me some problems. >>> >>>I couldn't find any assembler versions of FirstOne and PopCount in Crafty. >>>Are the table versions in C much slower? >>> >>>I mostly need PopCount for sparsely populated boards, perhaps the C loops are OK >>>for this? >>> >>>I would really like both 32 and 64 bit versions of FirstOne, so if someone can >>>post them or point me to where I can find them it would be great. >>> >>>thx, >>>-S. >> >>The assembly code used to be in x86.s in Crafty. > >thanks. >I get a lot of errors when compiling it: > >$ gcc *.s >X86.s: Assembler messages: >X86.s:4: Error: bad or irreducible absolute expression >X86.s:30: Error: bad or irreducible absolute expression >X86.s:45: Error: bad or irreducible absolute expression >X86.s:63: Error: bad or irreducible absolute expression >X86.s:122: Error: bad or irreducible absolute expression >X86.s:154: Error: bad or irreducible absolute expression >X86.s:182: Error: bad or irreducible absolute expression >X86.s:234: Error: bad or irreducible absolute expression >X86.s:266: Error: bad or irreducible absolute expression >X86.s:301: Error: bad or irreducible absolute expression >X86.s:347: Error: bad or irreducible absolute expression >X86.s:384: Error: bad or irreducible absolute expression >X86.s:456: Error: bad or irreducible absolute expression >X86.s:492: Error: bad or irreducible absolute expression >X86.s:516: Error: bad or irreducible absolute expression > >No clue what's wrong. Hi, I am neither programming nor Crafty expert though: I think that X86.s is not C code but assembler, so you have to compile with as, not gcc. And those error messages above are there IMO because on the first line of X86.s file you can see such definiton of the alignement constant: alignement = ALIGN. The word ALIGN is normally replaced during the make process (see MAKEFILE file). If you want compile only X86.s file, you have to substitute ALIGN on your own. I don't know which is the appropriate value, maybe 4 or 16? Filip > >Another thing, isn't Crafty using a different board orientation than a1=0, >h8=63? > >So I might need a rewrite to use them? > >>On Athlons, I do not find the quivalent C versions any slower - in fact quicker. > >They are also easier for me to work with, I'll think I will look at them a bit >more :) > >-S. >>Frank
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.