Tech Support > Microsoft Windows > Development Resources > MS Visual C 6 -- code generation options
MS Visual C 6 -- code generation options
Posted by Walter Faxon on July 15th, 2003


Hi. I want to have MSVC 6 generate the "cmov" (conditional move)
instruction when appropriate. Any command-line option or pragma or
something to allow this? Thanks.

Posted by Sten Westerback on July 15th, 2003


Most probably not.... why do you think you would
do better optimisation than the makers of the
compiler that spent years finding out the best ways?

- Sten

"Walter Faxon" <wfaxon@gis.net> wrote in message
news:57958c65.0307141518.5b3d6ed5@posting.google.c om...


Posted by Walter Faxon on July 15th, 2003


"Sten Westerback" <sten.westerback@NO_SPAMnokia.com> wrote in message news:<KxMQa.7574$g4.149183@news1.nokia.com>...

Hi, Sten.

"cmov" is an instruction available only from the later Pentiums on;
MSVC generates code by default for a 386 or 486, so it will run
anywhere. How do you tell the compiler that you are generating code
for a PIII or PIV? I want the compiler to do all the work deciding
when/if to use cmov; it just needs a little "hint".

I don't have access to MSVC6 and its documentation so I can't look it
up or experiment myself; but I do need to document this for a friend.

Thanks!

-- Walter

Posted by Sten Westerback on July 15th, 2003


Ok...

well, MSVC 6 only supports up to Pentium Pro. Here is where to
disable the use of this application on 486 computers :
Project Settings dialog
C/C++ tab
Category: Code Generation
Processor: Pentium, Pentium Pro, 486, 385 or Blend

To utlize features of even higher CPU's, get newer compiler.

- Sten

"Walter Faxon" <wfaxon@gis.net> wrote in message
news:57958c65.0307150657.4ad9d27c@posting.google.c om...


Posted by Tim Robinson on July 15th, 2003


The Visual C++ Processor Pack (available for download from microsoft.com)
will give you intrinsics for some instructions supported by Pentium and
upwards, but I don't believe any (current) Microsoft complier will generate
these instructions itself.

--
Tim Robinson (MVP, Windows SDK)
http://www.themobius.co.uk/

"Sten Westerback" <sten.westerback@NO_SPAMnokia.com> wrote in message
news:mZUQa.7619$g4.150069@news1.nokia.com...


Posted by Walter Faxon on July 18th, 2003


Viz. MS Visual C 6 and generation of the "cmov" (conditional move)
instruction:

-----
Pentium Pro, Pentium 2, and Pentium 3 are all the same design, but the
latter processors have been tweaked significantly. Targeting one
should effectively target them all in this case.

Compiler option is /arch:SSE|SSE2
-----

So one can reasonably hope that selecting for the Pentium Pro should
do it, though I would prefer an experiment to verify this. Thanks to
all responders.

-- Walter

Posted by d2003xx on July 20th, 2003


"Sten Westerback" <sten.westerback@NO_SPAMnokia.com> wrote in message news:<mZUQa.7619$g4.150069@news1.nokia.com>...
Hey!! Both of Borland C++ builder and Open Watcom also support only up
to Pentium Pro! This is pretty weird.. (no flame.. but I remember gcc
supports k6/k7/..) Could somebody explain this for me?


Similar Posts