Author: Filip Tvrzsky
Date: 10:29:46 03/29/03
Go up one level in this thread
On March 29, 2003 at 13:18:50, Filip Tvrzsky wrote:
>On March 29, 2003 at 12:02:45, Sune Fischer wrote:
>
>>On March 29, 2003 at 11:48:25, Filip Tvrzsky wrote:
>>>>>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
>>
>>Hmmm, are you saying GCC can't compile assembler?
>>That sounds very strange to me, a compiler that can't compile?
>>
>
>From the GCC manual:
>"Several versions of the compiler (C, C++, Objective-C, Ada, Fortran, and Java)
>are integrated; this is why we use the name "GNU Compiler Collection". GCC can
>compile programs written in any of these languages. The Ada, Fortran, and Java
>compilers are described in separate manuals.
>"GCC" is a common shorthand term for the GNU Compiler Collection. This is both
>the most general name for the compiler, and the name used when the emphasis is
>on compiling C programs (as the abbreviation formerly stood for "GNU C
>Compiler")."
>There is nothing about assembler ...
>Of course, you can compile assembler with gcc as well but only if it is embedded
>in the asm statement like this:
>asm(" movl %eax, %ecx ");
>
>>Well, in any case I don't know how to write a makefile, so if that's what it
>>takes then I'm lost.
>>
>
>No, you don't need to write a makefile, neither I can do it. Simply substitue
>the word "ALIGN" in the first line of the X86.s file with some number, I suppose
>you 4 or 16, and try to compile it. "Error: bad or irreducible absolute
>expression" messages should disappear. But if you compile with gcc instead of as
>you become another error messages. If you will believe me and type: as X86.s ,
>then you should became your requested object file a.out ... :-)
>(at least it works so by me ...).
>Filip
And, please, substitute also the word "become" with "get" above ... Sorry, I
know, my English is very, very poor ...
Filip
>
>>But thanks for the info, I'll stick to C++ then :)
>>
>>-S.
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.