Specify the target platform for the instruction set and optimization.
t must be one of: native, native64, generic, generic64, platform–name.
The -xtarget option permits a quick and easy specification of the -xarch, -xchip, and -xcache combinations that occur on real platforms. The only meaning of -xtarget is in its expansion.
The performance of some programs may benefit by providing the compiler with an accurate description of the target computer hardware. When program performance is critical, the proper specification of the target hardware could be very important. This is especially true when running on the newer SPARC processors. However, for most programs and older SPARC processors, the performance gain is negligible and a generic specification is sufficient.
The actual expansion of -xtarget values can change from release to release. You can always determine the expansion that the compiler will use with the -dryrun flag:
demo% f95 -dryrun -xtarget=ultra4plus ### command line files and options (expanded): ### -dryrun -xarch=sparcvis -xcache=64/32/4/1:2048/64/4/2:32768/64/4/2 -xchip=ultra4plus |
Note that the —xtarget expansion for a particular named platform might not be the same as —xtarget=native on that same platform.
Optimize performance for the host platform (32–bits).
Expands to —m32 —xarch=native —xchip=native —xcache=native
Obsolete. Use —xtarget=native —m64 instead.
Get the best performance for most 32–bit platforms.
This is the default and expands to: -m32 -xarch=generic -xchip=generic -xcache=generic
Obsolete. Use -xtarget=generic -m64 instead.
Get the best performance for the specified platform listed below.
The following table gives a list of the commonly used system platform names accepted by the compiler.
Table 3–16 Expansions of Commonly Used -xtarget System Platforms
-xtarget= platform-name |
-xarch |
-xchip |
-xcache |
---|---|---|---|
sparc64vi |
sparcfmaf |
sparc64vi |
128/64/2:5120/64/10 |
sparc64vii |
sparcima |
sparc64vii |
64/64/2:5120/256/10 |
ultra |
sparcvis |
ultra |
16/32/1:512/64/1 |
ultra1/140 |
sparcvis |
ultra |
16/32/1:512/64/1 |
ultra1/170 |
sparcvis |
ultra |
16/32/1:512/64/1 |
ultra1/200 |
sparcvis |
ultra |
16/32/1:512/64/1 |
ultra2 |
sparcvis |
ultra2 |
16/32/1:512/64/1 |
ultra2/1170 |
sparcvis |
ultra |
16/32/1:512/64/1 |
ultra2/1200 |
sparcvis |
ultra |
16/32/1:1024/64/1 |
ultra2/1300 |
sparcvis |
ultra2 |
16/32/1:2048/64/1 |
ultra2/2170 |
sparcvis |
ultra |
16/32/1:512/64/1 |
ultra2/2200 |
sparcvis |
ultra |
16/32/1:1024/64/1 |
ultra2/2300 |
sparcvis |
ultra2 |
16/32/1:2048/64/1 |
ultra2e |
sparcvis |
ultra2e |
16/32/1:256/64/4 |
ultra2i |
sparcvis |
ultra2i |
16/32/1:512/64/1 |
ultra3 |
sparcvis |
ultra3 |
64/32/4:8192/512/1 |
ultra3cu |
sparcvis |
ultra3cu |
64/32/4:8192/512/2 |
ultra3i |
sparcvis |
ultra3i |
64/32/4:1024/64/4 |
ultra4 |
sparcvis |
ultra4 |
64/32/4:8192/128/2 |
ultra4plus |
sparcvis |
ultra4plus |
64/32/4/1:2048/64/4/2:32768/64/4/2 |
ultraT1 |
sparc |
ultraT1 |
8/16/4/4:3072/64/12/32 |
ultraT2 |
sparcvis2 |
ultraT2 |
8/16/4:4096/64/16 |
ultraT2plus |
sparcvis2 |
ultraT2plus |
8/16/4:4096/64/16 |
Compiling for a 64-bit Solaris OS on 64–bit enabled platforms is indicated by the -m64 flag. If -xtarget is specified, -m64 must appear after the -xtarget flag, as in:
-xtarget=ultra2 ... -m64 |
otherwise the default 32–bit memory model will be used.
The valid -xtarget platform names for x86 systems are:
generic, native, pentium, pentium_pro, pentium3, pentium4, woodcrest, penryn, nehalem, barcelona, and opteron.
Table 3–17 -xtarget Values on x86 Platforms
-xtarget= |
-xarch |
-xchip |
-xcache |
---|---|---|---|
generic |
generic |
generic |
generic |
opteron |
sse2 |
opteron |
64/64/2:1024/64/16 |
386 |
pentium |
generic |
|
pentium_pro |
pentium_pro |
pentium_pro |
generic |
pentium3 |
sse |
pentium3 |
16/32/4:256/32/4 |
pentium4 |
sse2 |
pentium4 |
8/64/4:256/128/8 |
nehalem |
sse4_2 |
nehalem |
32/64/8:256/64/8: 8192/64/16 |
penryn |
sse4_1 |
penryn |
2/64/8:4096/64/16 |
woodcrest |
ssse3 |
core2 |
32/64/8:4096/64/16 |
barcelona |
amdsse4a |
amdfam10 |
64/64/2:512/64/16 |
Compiling for 64-bit Solaris OS on 64-bit enabled x86 platform is indicated by the -m64 flag. For example, compiling with -xtarget=opteron is not necessary or sufficient. If -xtarget is specified, the -m64 option must appear after the -xtarget flag, as in:
-xtarget=opteron -m64 |
otherwise the compilation will be 32-bit x86.