C H A P T E R 4 |
Sun Performance Library for x86 |
This chapter describes the differences between the SPARC and x86 versions of the Sun Performance Library, and how to use compiler and linking options for SSE2-enabled machines and for generic x86 machines that are not SSE2-enabled.
This release of Sun Performance Library includes libraries for the Solaris/x86 platform. Two versions are available:
The x86 version of Sun Performance Library is functionally identical to the SPARC version, with the following exceptions:
The following versions of Solaris/x86 are required for SSE2 support:
As with the SPARC version, the Sun Performance Library is linked into the application using the -xlic_lib=sunperf flag.[1]
Use the -xarch flag to select between the SSE2 and compatibility versions of the Sun Performance Library. Setting -xarch=sse2 or -xtarget=pentium4 will build the SSE2 version of the library. Also, if building on a Pentium 4 machine running Solaris 9 update 6 or Solaris 10, setting -xarch=native or -xtarget=native or -fast will build the SSE2 version of the library. Any other link settings will build the compatibility version of the library.[2]
The following compile and link settings will build the compatibility version of the Sun Performance Library:
f95 -xarch=generic -xlic_lib=sunperf example.f -o example
The following compile and link settings will build the SSE2 version of the Sun Performance Library:
f95 -xarch=sse2 -xlic_lib=sunperf example.f -o example
The following compile and link settings will build the SSE2 version of the Sun Performance Library if built on a Pentium 4 machine running Solaris 9 update 6, or build the compatibility on other platforms:
f95 -fast -xlic_lib=sunperf example.f -o example
Copyright © 2005, Sun Microsystems, Inc. All Rights Reserved.