AMD64 vs EMT64, compilation & execution

Timothy C Prince tprince@myrealbox.com
Tue May 8 22:12:00 GMT 2007



-----Original Message-----
From: "Banibrata Dutta" <banibrata.dutta@gmail.com>
To: gcc-help@gcc.gnu.org
Date: Wed, 9 May 2007 00:19:42 +0530
Subject: AMD64 vs EMT64, compilation & execution

Hi,



My question in the scope of GCC is, is it guaranteed that Code
compiled and linked on AMD64 environment (s.a. AMD Opteron) will run
flawlessly in EMT64 environment (s.a. PentiumD w/EMT64), and
vice-versa ? Does GCC always guarantee that the processor specific
optimization is not used, but only instructions / features common to
both AMD64/EMT64 are used in the final binaries ?

_________________________________________________-
It seems evident to me that you should choose a value of -march= which is compatible with the range of machines you intend to support.  The default (omitting -march=) in gcc-4.2 and 4.3 is widely tested for satisfactory operation on both brands. 
Pentium-D supports sse3 instructions; should you use those (presumably intentionally), your binary would fail on AMD CPUs other than the most recent ones.
For gcc-3.4 and 4.1, -march=prescott improves Intel performance without hurting AMD, and does not automatically introduce sse3.  gcc x86-64 before 3.4.1 and 3.3.4 did not have satisfactory options for Intel.


Tim Prince



More information about the Gcc-help mailing list