Sun Studio 12: Fortran User's Guide

3.4.177 –xtarget=t

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.

3.4.177.1 Generic and Native Platforms

native

Optimize performance for the host platform (32–bits).

Expands to —m32 —xarch=native —xchip=native —xcache=native

native64

Obsolete. Use —xtarget=native —m64 instead.

generic

Get the best performance for most 32–bit platforms.

This is the default and expands to: -m32 -xarch=generic -xchip=generic -xcache=generic

generic64

Obsolete. Use -xtarget=generic -m64 instead.

platform–name

Get the best performance for the specified platform listed below.

3.4.177.2 SPARC Platforms

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

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

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.

3.4.177.3 x86 Platforms

The valid -xtarget platform names for x86 systems are:

generic, native, pentium, pentium_pro, pentium3, pentium4, and opteron.

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.