Specifications

52 Troubleshooting and Portability Issues Chapter 4
32035 Rev. 3.22 November 2007
Compiler Usage Guidelines for AMD64 Platforms
Does your program rely on x87 features?
Some Intel compiler switches instruct the compiler to use SSE2 registers and instructions. If the
results do not match your expectations when using SSE2, the program may rely on some x87 features.
As a diagnostic step, try building the program using x87 operations for floating-point computations
and see if the results are as expected. Omitting the -QxK, -QxW, and -arch:SSE2 switches
recommended in the general performance guidelines causes the compiler to build the program using
x87 operations for floating-point computations.
Because omitting the -QxK, -QxW, and -arch:SSE2 switches could lower performance, the user
could investigate the precision requirements of the program. If the user has access to the source code,
it may be possible to adapt the algorithm to SSE2.
4.11.3 Program Terminates Unexpectedly
Are you using an architecture switch that is unsafe for AMD Opteron™ processors?
Some architecture switches can cause programs compiled with the Intel compiler versions 7.1 and 8.0
to terminate unexpectedly when run on AMD Opteron™ processors. Table 9 shows 32-bit Intel
compiler architecture switches that are not safe for the AMD Opteron™ processor. If a program built
with any of the switches shown in Table 9 produces errors, try building the program without those
switches.
4.11.4 Program Gives Unexpected Results or Exception Behavior
Does your program need C++ exception handling?
By default, the Intel C++ compiler for Microsoft Windows does not turn on C++ exception handling.
To enable C++ exceptions, use the -GX and -GR switches with the C++ compiler.
4.12 Microsoft
®
Compilers (32-Bit) for Microsoft
®
Windows
®
This section addresses errors and unexpected results that may be encountered when using 32-bit
Microsoft compilers for Microsoft Windows.
Table 9. Unsafe Architecture Switches in 32-Bit Intel Compilers for Microsoft
®
Windows
®
Compiler Version Unsafe Architecture Switches
Intel 7.1 -QxK and -QxW
Intel 8.0 -QxK -QxW -QxP -QxB and -QxN
Intel 8.1 -QxN and -QxP