D.gnu - Re: 64-bit gdc on AMD Opteron?
- dslate patrec.com Mar 28 2005
- Benjamin Herr <ben 0x539.de> Mar 29 2005
Question for Benjamin Herr: My gdc line numbers appear to be different from yours. I presume you are referring to this line in lexer.c: assert(sizeof(long) == 4); // some dependencies which I "fixed" to: assert(sizeof(long) >= 4); // some dependencies Is this correct? In aggregate.h the "offending line" seems to be: #define CLASSINFO_SIZE 0x3C // value of ClassInfo.size I wasn't sure exactly what to do with this. Please post your diffs. Thanks, -- Dave Slate dslate patrec.com On Mon, 28 Mar 2005 Benjamin Herr wrote:Anders F Björklund wrote:I believe that DMD and Phobos itself is *not* 64-bit clean, and GDC is merely echoing this fact when building the front-end/runtime-lib.
I think that gdc is actually very close to being clean, "fixing" only <built-dir>/gcc/d/dmd/lexer.c:1533 and <built-dir>/gcc/d/dmd/aggregate.h:197 got it to compile here. However Phobos seems very "broken". Would it not be easier to maintain Phobos if we finally reorganised the standard library after all these years, so the things that are vital to the language and required to compile simple programs are separated from tools and convenience wrappers?Trying to get a PPC64 build going myself, but I need a fully 64 OS first (at the moment I only have 32-bit Mac OS X and 32-bit Linux)
Gentoo has quite cool 64bit support.--anders
--funroll-loops
Mar 28 2005
dslate patrec.com wrote:Question for Benjamin Herr: My gdc line numbers appear to be different from yours.
Yes, mine are quite outdated.I presume you are referring to this line in lexer.c: assert(sizeof(long) == 4); // some dependencies which I "fixed" to: assert(sizeof(long) >= 4); // some dependencies Is this correct?
I did indeed refer to this line. I do not know whether changing the assert will eventually destroy the world, though.In aggregate.h the "offending line" seems to be: #define CLASSINFO_SIZE 0x3C // value of ClassInfo.size I wasn't sure exactly what to do with this. Please post your diffs.
I think my guesswork eventually lead me to use #define CLASSINFO_SIZE \ (sizeof(void*)*2 * 4 + sizeof(void*)*5 + sizeof(int)*2)Thanks, -- Dave Slate dslate patrec.com
I hope that my very unscientific hacks are of any use, -- Benjamin Herr
Mar 29 2005








Benjamin Herr <ben 0x539.de>