473,395 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Code Generation and VC++ 8...

Recently I tried to use -G5 option on CL compiler (from Visual Studio
2005)... To my surprise, there is no processor specific optimizations
anymore! Is that correct?

Is so, why?

[]s
Fred
Mar 23 '06 #1
7 2109
"Frederico Pissarra" <fr*******@vgainfo.com> wrote in message
news:ue****************@TK2MSFTNGP14.phx.gbl...
Recently I tried to use -G5 option on CL compiler (from Visual Studio
2005)... To my surprise, there is no processor specific optimizations
anymore! Is that correct?
Yes.
Is so, why?


They didn't actually do much of anything in the first place, so they were
eliminated.

Note that there is now /arch:sse{2}, which first appeared with VC7.1, and a
host of new floating-point code generation options which together have much
more performance impact than /G3{4,5,6} ever had.

-cd
Mar 23 '06 #2
"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
escreveu na mensagem news:ea**************@TK2MSFTNGP14.phx.gbl...
"Frederico Pissarra" <fr*******@vgainfo.com> wrote in message
news:ue****************@TK2MSFTNGP14.phx.gbl...
Recently I tried to use -G5 option on CL compiler (from Visual Studio
2005)... To my surprise, there is no processor specific optimizations
anymore! Is that correct?


Yes.
Is so, why?


They didn't actually do much of anything in the first place, so they were
eliminated.

Note that there is now /arch:sse{2}, which first appeared with VC7.1, and
a host of new floating-point code generation options which together have
much more performance impact than /G3{4,5,6} ever had.

-cd


Hello, Carl!!

I never did a profound analysis of /G5 optimized generated code... I suppose
/G5 was created to do things like instruction pairing and so on... this is
made automatically in VC 8? What is the default platform? 386 or Pentium?

To use SSE the compiler must expect at least a Pentium 3 processor... SSE2,
Pentium 4!

What about AMD Athlon 64 processors?

Thanks....
Fred

PS: BTW... Probably you 'll notice some mispelled words and some expressions
not very common in english... this is because I'm brasillian and english is
not my native idiom...
So, please, forgive my poor english! :)
Mar 24 '06 #3
Frederico Pissarra wrote:
Hello, Carl!!

I never did a profound analysis of /G5 optimized generated code... I
suppose /G5 was created to do things like instruction pairing and so
on... this is made automatically in VC 8? What is the default
platform? 386 or Pentium?
The default is what used to be known as /GB - the "blended model".
Generally, the VC++ team tries to make each compiler release work well for
the "current" generation of CPUs when that versio nof VC++ is released. In
the case of VC8, it's tuned towards P4/AMD, but tends to avoid constructs
that perform really badly on older processors to avoid penalizing users with
older CPUs.

To use SSE the compiler must expect at least a Pentium 3 processor...
SSE2, Pentium 4!
Yes. Of course, that's a function of which CPU is used to run the code -
you can compile for SSE(2) on any machine that supports VC++, but if you
compiled for SSE(2), then the program will fail at runtime if you're not
runnig on a new enough CPU.

What about AMD Athlon 64 processors?
AMD64/EMT64 are fully supported by VC8, but it's a different compiler
executable rather than a command-line switch to specify 64 bit code
generation.

Thanks....
Fred

PS: BTW... Probably you 'll notice some mispelled words and some
expressions not very common in english... this is because I'm
brasillian and english is not my native idiom...
So, please, forgive my poor english! :)


Your English is just fine - no problems!

-cd
Mar 24 '06 #4

"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
Frederico Pissarra wrote:
Hello, Carl!! What about AMD Athlon 64 processors?


AMD64/EMT64 are fully supported by VC8, but it's a different compiler
executable rather than a command-line switch to specify 64 bit code
generation.


Indeed. You have to create a new active solution platform it's called x64 as
opposed to win32.

Detail. Only the win32 VC compiler platform supports __asm statements. It
seems that creating own assemblycode has become more of a hobby that a
usefull activity since the compiler produces very efficient assembly code.

Mar 28 '06 #5
Egbert Nierop wrote:
"Carl Daniel [VC++ MVP]"
<cp*****************************@mvps.org.nospam > wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Frederico Pissarra wrote:
Hello, Carl!! What about AMD Athlon 64 processors?


AMD64/EMT64 are fully supported by VC8, but it's a different compiler
executable rather than a command-line switch to specify 64 bit code
generation.


Indeed. You have to create a new active solution platform it's called
x64 as opposed to win32.

Detail. Only the win32 VC compiler platform supports __asm
statements. It seems that creating own assemblycode has become more
of a hobby that a usefull activity since the compiler produces very
efficient assembly code.


....although there are lots of requests for support for __asm in the x64
compiler. who knows, we might see it some day (but not in Orcas, I'm sure).

-cd
Mar 28 '06 #6

"Carl Daniel [VC++ MVP]"
<cp*****************************@mvps.org.nospam > skrev i meddelandet
news:u2**************@tk2msftngp13.phx.gbl...
Egbert Nierop wrote:
"Carl Daniel [VC++ MVP]"
<cp*****************************@mvps.org.nospam > wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Frederico Pissarra wrote:
Hello, Carl!!
What about AMD Athlon 64 processors?

AMD64/EMT64 are fully supported by VC8, but it's a different
compiler
executable rather than a command-line switch to specify 64 bit
code
generation.


Indeed. You have to create a new active solution platform it's
called
x64 as opposed to win32.

Detail. Only the win32 VC compiler platform supports __asm
statements. It seems that creating own assemblycode has become more
of a hobby that a usefull activity since the compiler produces very
efficient assembly code.


...although there are lots of requests for support for __asm in the
x64 compiler.


Many of the requests are from people who haven't yet realized that
most of the "interesting" instructions are available as intrinsics.
These integrate very well with the optimizer.

Other mixed in inline assembler is very diffcult in x86 mode, because
- optimizing significantly better than the compiler is really, really
difficult
- the asm code disturbs the optimizer, potentialy reducing the quality
of the surrounding code

You can still write whole functions in assembler, and put them in .asm
files.

who knows, we might see it some day (but not in Orcas, I'm sure).


I doubt that there is enough real use for it. :-)
Bo Persson
Mar 28 '06 #7

"Bo Persson" <bo*@gmb.dk> skrev i meddelandet
news:48************@individual.net...

"Carl Daniel [VC++ MVP]"
<cp*****************************@mvps.org.nospam > skrev i
meddelandet news:u2**************@tk2msftngp13.phx.gbl...
Egbert Nierop wrote:
"Carl Daniel [VC++ MVP]"
<cp*****************************@mvps.org.nospam > wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Frederico Pissarra wrote:
> Hello, Carl!!

> What about AMD Athlon 64 processors?

AMD64/EMT64 are fully supported by VC8, but it's a different
compiler
executable rather than a command-line switch to specify 64 bit
code
generation.

Indeed. You have to create a new active solution platform it's
called
x64 as opposed to win32.

Detail. Only the win32 VC compiler platform supports __asm
statements. It seems that creating own assemblycode has become
more
of a hobby that a usefull activity since the compiler produces
very
efficient assembly code.
...although there are lots of requests for support for __asm in the
x64 compiler.


Many of the requests are from people who haven't yet realized that
most of the "interesting" instructions are available as intrinsics.
These integrate very well with the optimizer.

Other mixed in inline assembler is very diffcult in x86 mode,
because


Wrote x86 meaning x64, of course!
- optimizing significantly better than the compiler is really,
really difficult
- the asm code disturbs the optimizer, potentialy reducing the
quality of the surrounding code

You can still write whole functions in assembler, and put them in
.asm files.

who knows, we might see it some day (but not in Orcas, I'm sure).


I doubt that there is enough real use for it. :-)
Bo Persson

Mar 28 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
8
by: Wilk Teverbaugh | last post by:
I'm using get rows to build a table for a calendar. The specific view for this calendar is for an entire month. Each appointment slot is one half hour long. If I were to generate a page for the...
4
by: | last post by:
Some time ago I installed VC# 2003, made a small generic project, compile with the allow unsafe flag and I get the error below: "error CS1577: Assembly generation failed -- Unexpected exception...
8
by: | last post by:
Wel, I am rebuilding the VC# 2002 project that I have deployment problems with the 2003 version, hoping this solves the problems, but now I encounter this wierd bug??? If I have the project, and...
0
by: Greg | last post by:
Hello, I'm about to write a database application and I'm wondering how to approach it. Is it worth to use the database code auto-generation (VC# 2005) in the long run? Or at some point I'll be...
5
by: Ioannis Vranos | last post by:
Is it possible to use "Native Code Generation" during installation of VS 2003 programs so as to avoid run-time JITing, and if yes, how? -- Ioannis Vranos
3
by: B. | last post by:
We converted VC++ 6.0 to VS 2005 and tried to compile with /clr, however, we got few linking errors: MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent...
7
by: colin | last post by:
Hi, Is there a way of doing simple code generation inside visual c# express such as similar to preprocessing in c++ ? I need to generate a library for some vector maths, but I need to...
3
by: vrsathyan | last post by:
Hi.., While executing the following code in purifier.., std::vector<int> vecX; vecX.clear(); int iCount = 0; { int iVal;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.