CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2009
    Posts
    48

    Moving to 64bit compiler, what version should I choose?

    Greetings,

    I have no experience with compiling 64bit targets. Using 64bit Windows and need a compiler (preferably Intel) to be able build as 32bit as 64bit targets, must be VC-compatible.

    There are two editions I don't understand difference between :

    EM64T (amd64?), uses x64 binaries
    Itanium (ia64?), uses x86 binaries

    what's the difference between amd64 and ia64? is it "more" 64-bit? as I can't run ia64 bianries

    Now I'm confused which version will suit my needs, it means compile i386 + amd64 targets, any explanation about these editions?

    Finally, how do I instruct the compiler and linker to build 64bit targets,
    I assume /D _WIN64,WIN64 and /machine:x64
    Are there more switches required?

    Thanks

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Moving to 64bit compiler, what version should I choose?

    Quote Originally Posted by Anakunda View Post
    I [...] need a compiler (preferably Intel) to be able build as 32bit as 64bit targets, must be VC-compatible.
    If it is required to be VC compatible, why then not use VC?

    There are two editions I don't understand difference between :

    EM64T (amd64?), uses x64 binaries
    Itanium (ia64?), uses x86 binaries
    iA64 (Itanium) is AFAIK exclusively used in server environments, while x64 is the "mainstream" 64-bit technology. The two are not compatible to each other. (The funny side note about that: After Intel realized that their iA64 wasn't really successful, they licensed the 64-bit extensions from AMD. )

    HTH
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Feb 2009
    Posts
    48

    Re: Moving to 64bit compiler, what version should I choose?

    Then,

    Itanium version runs on any processor, and only does compile IA64 code

    and

    EM64T version only runs on amd64 processor, and can compile both i386 and amd64 code

    ?

  4. #4
    Join Date
    Apr 2008
    Posts
    118

    Re: Moving to 64bit compiler, what version should I choose?

    Quote Originally Posted by Anakunda View Post
    Then,

    Itanium version runs on any processor, and only does compile IA64 code

    and

    EM64T version only runs on amd64 processor, and can compile both i386 and amd64 code

    ?
    Not quite. A little bit of history (probably with some details missing or wrong). When time came to built a processor that understood a 64 bit instruction set, Intel built a completely new thing called IA64 (also known as Intel Itanium architecture) that did not understand the existing 32 bit x86 instruction set.

    AMD went a different way and created a 64 bit processor that did understand the existing 32 bit x86 instruction set. This proved to be far more popular. Intel ended up supporting this too, calling it IA-32e, EM64T and Intel 64 (they took a while deciding what they would call it). It's also known as x86-64. If your desktop PC is 64 bit, it's probably using this architecture, and when you get software to run on your desktop PC, you should get the x86-64 version.

    You should build for whichever architecture you intend to run your code on. If you know you are targeting Itanium, then build for that. If you're targeting x86-64, build for that. Find out what processor you will need to run your code on, and build for that.
    Last edited by Moschops; November 8th, 2010 at 06:07 AM.

  5. #5
    Join Date
    Feb 2009
    Posts
    48

    Re: Moving to 64bit compiler, what version should I choose?

    Quote Originally Posted by Moschops View Post
    Intel ended up supporting this too, calling it IA-32e, EM64T and Intel 64 (they took a while deciding what they would call it). It's also known as x86-64.

    There's a bit of confusion. I'm deducing the desired 64bit target for my needs is amd64, not ia64, as ia64 binaries doesnot run on my 64bit Wins, thus I'm choosing the EM64T version.
    Looking to registry Intel messes up with the classification.

    This is installation entry for ICL for Itanium

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intel\Suites\11.1\060\C++\Itanium]
    "DisplayString"="Intel(R) C++ 11.1.060 [IA-64]"
    "BinDir"="$(ICInstallDir)bin\\ia32_ia64;$(CommonProgramFiles)\\Intel\\Shared Files\\Ia32\\Bin"
    "LibDir"="$(ICInstallDir)lib\\ia64;$(ICInstallDir)ipp\\ia64\\lib"

    while ths is installation entry for ICL for EM64T

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intel\Suites\11.1\060\C++\EM64T_NATIVE]
    "DisplayString"="Intel(R) C++ 11.1.060 [Intel(R) 64]"
    "BinDir"="$(ICInstallDir)bin\\Intel64;$(CommonProgramFiles)\\Intel\\Shared Files\\Ia32\\Bin"
    "LibDir"="$(ICInstallDir)lib\\Intel64;$(ICInstallDir)ipp\\em64t\\lib"

    Then
    Itanium == IA-64 == ia32_ia64(???)
    and
    EM64T == Intel64 (and probably == amd64)

    So I'm focusing to EM64T but ia32_ia64 is right as well?

    One more thing, would I be able to generate i386 code with C++ for EM64T, or must I have installed C++ for IA32 parallely?

  6. #6
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Moving to 64bit compiler, what version should I choose?

    Quote Originally Posted by Anakunda View Post
    So I'm focusing to EM64T [...]?
    As I understand your question, yes.

    [...] but ia32_ia64 is right as well?
    I don't really know what "ia32_ia64" means from the registry snippet you posted. I just can repeat that iA64 is not compatible with EM64T (or whatever they call it).

    One more thing, would I be able to generate i386 code with C++ for EM64T, or must I have installed C++ for IA32 parallely?
    At least I can say that VC++ 2010 supports all of them, down to i386 (with the /G3 command line option). I can't say anything about the other development packages.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured