www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - What CPU does DMD optimize for?

reply Def <Def_member pathlink.com> writes:
Hello, I assume that DMD generates code for 386 and higher. Is this correct?
If so, what processor will DMD optimize the code for if the -O option is
invoked?
Feb 19 2006
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Def" <Def_member pathlink.com> wrote in message 
news:dtau3r$7i5$1 digitaldaemon.com...
 Hello, I assume that DMD generates code for 386 and higher. Is this 
 correct?
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
Feb 19 2006
next sibling parent reply pmoore <pmoore_member pathlink.com> writes:
Hi,

I was wondering the same thing. I assume you mean Pentium Pro. Am I right in
thinking that this is the case for optimized and unoptimized code generation and
that DMC does not emit SSE instructions?

In article <dtbb0k$ju7$1 digitaldaemon.com>, Walter Bright says...
"Def" <Def_member pathlink.com> wrote in message 
news:dtau3r$7i5$1 digitaldaemon.com...
 Hello, I assume that DMD generates code for 386 and higher. Is this 
 correct?
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
Feb 20 2006
next sibling parent "Lionello Lunesu" <lio remove.lunesu.com> writes:
Hi,

I really wouldn't know, but don't count on it.. SSE instructions are useful 
is some very specific cases. I was surprised when I saw that Microsoft's VC8 
compiler emits SSE instructions, but found out that the program (3D 
visualisation using OpenGL) ran slower with that feature turned on. SSE, as 
MMX and the other SSE's, is really meant to be written using inline 
assembly, when the programmer knows where to do batch operations on big 
arrays.

L.

"pmoore" <pmoore_member pathlink.com> wrote in message 
news:dtccf9$1lh4$1 digitaldaemon.com...
 Hi,

 I was wondering the same thing. I assume you mean Pentium Pro. Am I right 
 in
 thinking that this is the case for optimized and unoptimized code 
 generation and
 that DMC does not emit SSE instructions?

 In article <dtbb0k$ju7$1 digitaldaemon.com>, Walter Bright says...
"Def" <Def_member pathlink.com> wrote in message
news:dtau3r$7i5$1 digitaldaemon.com...
 Hello, I assume that DMD generates code for 386 and higher. Is this
 correct?
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
Feb 20 2006
prev sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"pmoore" <pmoore_member pathlink.com> wrote in message 
news:dtccf9$1lh4$1 digitaldaemon.com...
 I was wondering the same thing. I assume you mean Pentium Pro. Am I right 
 in
 thinking that this is the case for optimized and unoptimized code 
 generation and
 that DMC does not emit SSE instructions?
That's right.
Feb 20 2006
prev sibling next sibling parent Alexander Panek <alexander.panek brainsware.org> writes:
Walter Bright wrote:
 "Def" <Def_member pathlink.com> wrote in message 
 news:dtau3r$7i5$1 digitaldaemon.com...
 
Hello, I assume that DMD generates code for 386 and higher. Is this 
correct?
If so, what processor will DMD optimize the code for if the -O option is
invoked?
Pentium 6
I wonder if that was a joke, or not...if it was, it's funny. <g> If not, what the hell is a Pentium 6? I guess a 686..? Regards, Alex
Feb 20 2006
prev sibling next sibling parent reply Def <Def_member pathlink.com> writes:
Thanks heaps for your answer so far, but still...:

In article <dtbb0k$ju7$1 digitaldaemon.com>, Walter Bright says...

"Def" <Def_member pathlink.com> wrote in message 
news:dtau3r$7i5$1 digitaldaemon.com...
 Hello, I assume that DMD generates code for 386 and higher. Is this 
 correct?
This question remains unanswered. I assume 386 and higher, but is it correct? It is important to mark my apps to the end user as "needs 386 or higher" or whatever.
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
This is an unusual term, for me at least. If, for example, we refer to http://en.wikipedia.org/wiki/Pentium_1 then which processor is the one you mean exactly? Def
Feb 21 2006
next sibling parent Trevor Parscal <Trevor_member pathlink.com> writes:
In article <dtf8t0$1uh4$1 digitaldaemon.com>, Def says...
Thanks heaps for your answer so far, but still...:

In article <dtbb0k$ju7$1 digitaldaemon.com>, Walter Bright says...

"Def" <Def_member pathlink.com> wrote in message 
news:dtau3r$7i5$1 digitaldaemon.com...
 Hello, I assume that DMD generates code for 386 and higher. Is this 
 correct?
This question remains unanswered. I assume 386 and higher, but is it correct? It is important to mark my apps to the end user as "needs 386 or higher" or whatever.
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
This is an unusual term, for me at least. If, for example, we refer to http://en.wikipedia.org/wiki/Pentium_1 then which processor is the one you mean exactly? Def
Although I have no clue which CPU DMD optimizes for - it makes me think - would it be possible (sorry, don't mean to just invent features for walter to build here) to have some predefined versions that corespond to the cpu flags should there ever be any added? AKA - if -OPentium4 is ever an option, than "version = Pentium4" or however walter would prefer to format it - that way our code could take the compilation perameters and do something usefull with it as well - like when using inline ASM to optimize for a CPU... Anyhoo - just a thought. Thanks, Trevor Parscal
Feb 21 2006
prev sibling parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Def" <Def_member pathlink.com> wrote in message 
news:dtf8t0$1uh4$1 digitaldaemon.com...
 This question remains unanswered. I assume 386 and higher, but is it
 correct? It is important to mark my apps to the end user as "needs 386 or
 higher" or whatever.
Yes, it's 386 or higher.
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
This is an unusual term, for me at least. If, for example, we refer to http://en.wikipedia.org/wiki/Pentium_1 then which processor is the one you mean exactly?
Pentium Pro.
Feb 21 2006
next sibling parent reply pmoore <pmoore_member pathlink.com> writes:
Walter, Does DMC actually emit any Pentium Pro instructions eg. CMOV, FCMOV? If
not I would class it as 486 or higher as it definitely _does_ require a FPU.

In article <dtfpdh$2gih$2 digitaldaemon.com>, Walter Bright says...
"Def" <Def_member pathlink.com> wrote in message 
news:dtf8t0$1uh4$1 digitaldaemon.com...
 This question remains unanswered. I assume 386 and higher, but is it
 correct? It is important to mark my apps to the end user as "needs 386 or
 higher" or whatever.
Yes, it's 386 or higher.
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
This is an unusual term, for me at least. If, for example, we refer to http://en.wikipedia.org/wiki/Pentium_1 then which processor is the one you mean exactly?
Pentium Pro.
Feb 21 2006
parent "Walter Bright" <newshound digitalmars.com> writes:
"pmoore" <pmoore_member pathlink.com> wrote in message 
news:dtft1s$2kee$1 digitaldaemon.com...
 Walter, Does DMC actually emit any Pentium Pro instructions eg. CMOV, 
 FCMOV?
No.
 If
 not I would class it as 486 or higher as it definitely _does_ require a 
 FPU.
An FPU is not required, as Win32 will emulate the FPU on a 386 if there isn't one. This *could* be a problem on the DOS32 system, but DMC will generate calls to its own emulator for that. Also, the 386 did have a 387 FPU available for it.
Feb 23 2006
prev sibling next sibling parent Def <Def_member pathlink.com> writes:
Walter, thanks for clarifying this. - Def

In article <dtfpdh$2gih$2 digitaldaemon.com>, Walter Bright says...
"Def" <Def_member pathlink.com> wrote in message 
news:dtf8t0$1uh4$1 digitaldaemon.com...
 This question remains unanswered. I assume 386 and higher, but is it
 correct? It is important to mark my apps to the end user as "needs 386 or
 higher" or whatever.
Yes, it's 386 or higher.
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
This is an unusual term, for me at least. If, for example, we refer to http://en.wikipedia.org/wiki/Pentium_1 then which processor is the one you mean exactly?
Pentium Pro.
Feb 22 2006
prev sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Walter Bright wrote:

This question remains unanswered. I assume 386 and higher, but is it
correct? It is important to mark my apps to the end user as "needs 386 or
higher" or whatever.
Yes, it's 386 or higher.
If so, what processor will DMD optimize the code for if the -O option is
invoked?
Pentium 6
This is an unusual term, for me at least. If, for example, we refer to http://en.wikipedia.org/wiki/Pentium_1 then which processor is the one you mean exactly?
Pentium Pro.
In case anyone wonders, the equivalent flags for GDC are: Old style: -march=i386 -mcpu=i686 New style: -march=i386 -mtune=pentium4 (as used by RPM, which builds as .i386.rpm by default even though usually a Pentium or better is required in practice) Where: i586 == pentium i686 == pentiumpro http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/i386-and-x86_002d64-Options.html --anders
Feb 22 2006
prev sibling parent Niko Korhonen <niktheblak hotmail.com> writes:
Walter Bright wrote:
 Hello, I assume that DMD generates code for 386 and higher. Is this 
 correct?
 If so, what processor will DMD optimize the code for if the -O option is
 invoked?
Pentium 6
Wow! And we're currently at Pentium 4! Talk about bleeding edge! I just had to say it <g> -- Niko Korhonen SW Developer
Feb 23 2006