DMD Backend: Deciding instructions to use/avoid?

Nick Sabalausky a at a.a
Wed Jun 8 13:22:00 PDT 2011


"Don" <nospam at nospam.com> wrote in message 
news:isoh6c$15jb$1 at digitalmars.com...
> Nick Sabalausky wrote:
>> So my main question: Does DMD do anything like, say, detecting the CPU at 
>> compile time and then enabling instructions only available on that CPU 
>> and up? Or does it do anything like always assuming the target CPU has 
>> SSE2? Anything like that that could cause differences between our CPUs to 
>> result in object code that will work on one of the CPUs, but not the 
>> other? FWIW, the CPU on my linux box is i686, so it's not like I'm on 
>> some super-ultra-old i586, or anything like that.
>
> DMD itself doesn't, but the array operations do. The DMD backend is 
> ancient, and generates code for original Pentiums (+ 64 bit equivalents of 
> the same instructions).

Is there any way to force the array operations down to a certain level? Or 
even better yet, have them detect the CPU at startup and then use the 
appropriate version?




More information about the Digitalmars-d-learn mailing list