What is the minimum target CPU architecture for the various versions of Visual Studio? -


what minimum target processor architecture (indicated _m_ix86 predefined macros) supported every version of visual studio 2008, 2010 , 2012?

for example, msvs 2012 supports pentium pro , higher.

the classic switch /g. available options differed different versions of compiler (with newer versions dropping older options, albeit continuing accept them compatibility reasons). here's got:

  • /g3 built code optimized 386 processors (_m_ix86 set 300)
  • /g4 486 processor (_m_ix86 set 400)
  • /g5 built code optimized pentium (_m_ix86 set 500)
  • /g6 built code optimized pentium pro, ii, , iii (_m_ix86 set 600)
  • /g7 built code optimized pentium 4 or amd athlon (_m_ix86 set 700)

  • /gb specified either "blend" mode or lowest common denominator reasonable when version of compiler released. default option if no other specified.

and of course, bears explicit mention setting option optimize newer processor architecture did not prevent code running on older processor architecture. wasn't optimized architecture , might run more slowly.

however, if compiler option in a current version of documentation, you'll see no mention of of this. see itanium processors (which we'll put aside). that's because the compiler shipping vc++ 2005 dropped /g3/g7 compiler options altogether:

[the] /g3, /g4, /g5, /g6, /g7, , /gb compiler options have been removed. compiler uses "blended model" attempts create best output file architectures.

so, although many of remember vc++ 6, code generation setting historical curiosity far vc++ 2008. therefore i'm not sure impression vs 2012 supports pentium pro. can't find mention of anywhere in official documentation or elsewhere online. limiting factor version 2012 of compiler not processor architecture os version. if you've patched compiler, libraries, , other accoutrements support targeting windows xp, able run application on original pentium-233, onto you've masochistically shoe-horned windows xp.

the purpose of _m_ix86 macro indicator you're targeting intel ia-32 processor family—more commonly known old 32-bit x86—in contrast 1 of other supported target architectures, _m_amd64 64-bit x86. should treat defined/undefined value now.

yes, old table of values _m_ix86 still appears in the latest version of preprocessor documentation, utterly obsolete. you'll note other obsolete symbols appear there well, such _m_ppc: last version of msvc++ shipped powerpc compiler? 4.2?


but part of story. there still other compiler options govern code generation respect target architectures.

for example, /arch switch. the latest version of documentation, have following options:

  • /arch:ia32 sets lowest common denominator, using x87 floating point
  • /arch:sse turns on sse instructions
  • /arch:sse2 turns on sse2 instructions (and default x86)
  • /arch:avx turns on intel advanced vector extensions
  • /arch:avx2 turns on intel advanced vector extensions 2

    if read remarks section, you'll see these options can imply more specified instruction set. example, since processors support sse instructions support cmov instruction, cmov instruction generated when /arch:sse or higher specified. cmov instruction has nothing sse; in fact, sse introduced pentium iii while cmov introduced way pentium pro. it's guaranteed supported on architectures support sse.

the other relevant option controlled /favor switch. new starting vc++ 2008, , presumably replacement old /g3/g7 options. the documentation says:

  • /favor:blend default , produces code no unique optimizations
  • /favor:intel64 generates code specific intel's implementation of x86-64
  • /favor:amd64 generates code specific amd's implementation of x86-64
  • /favor:atom generates code specific intel's atom processor

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -