DMD and 64-bit
Don
nospam at nospam.com
Sun Feb 20 11:36:48 PST 2011
Steven Schveighoffer wrote:
> On Sat, 19 Feb 2011 19:21:05 -0500, Nick Sabalausky <a at a.a> wrote:
>
>> "Jonathan M Davis" <jmdavisProg at gmx.com> wrote in message
>> news:mailman.1787.1298108224.4748.digitalmars-d at puremagic.com...
>>> On Saturday 19 February 2011 01:12:25 Russel Winder wrote:
>>> > Am I correct in assuming that DMD generates 32-bit by default and that
>>> > for 64-bit you have to give the -m64 option?
>>> >
>>> > Is the eventual plan to use the natural word length of the platform as
>>> > the default, i.e. 32-bit on 32-bit and 64-bit on 64-bit, with the
>>> option
>>> > to force something different using the -m option à la GCC?
>>>
>>> 32 bit is the default for now. I don't know what Walter intends to do in
>>> the
>>> long run. If it were like gcc, then the default platform would be the
>>> platform
>>> which the compiler is built for (which is exactly what it's doing right
>>> now),
>>> but as far as I know, Walter has no plans to port dmd to x86_64.
>>>
>>> So, for now 32 bit is the default. It may or may not change later to be
>>> the
>>> platform that you're building on. Ideally though, it would be like
>>> gcc and
>>> we'd
>>> actually get a 64 bit version of dmd at some point.
>>
>> I don't mean this as "anti-64bit" trolling, just a genuine question, but
>> what would be the point of a 64-bit build of DMD? (Note: I'm talking
>> about
>> host, not target). Just to compile projects that have (on the order of)
>> gigabytes of source?
>
> This just sparked a thought of curiosity -- CTFE runs in the compiler,
> and if the compiler is 32-bit, does this mean that 64-bit builds execute
> CTFE functions in 32-bits during compilation?
No. The functions haven't been compiled at that point. CTFE happens in
the front end, whereas the differences between 64 and 32 bits only
happens in the back end. CTFE works on the syntax tree level.
> If so, are there any
> reprecussions? Thinking about it, everything is really dictated by the
> type system (which should be properly 64-bit), and for CTFE, the code
> used to execute isn't important, it's really just the result, right?
Yes, the type system takes care of everything.
More information about the Digitalmars-d
mailing list