Application development on Solaris OS using Sun Studio compilers and tools
Solaris Developer
ABOUT

We are the Solaris Developer Information Products Team:
Richard Friedman, David Lindt, Kami Shahi, Jyothi Srinath, Paul Echeverri, Ann Rice, Alta Elstad, Susan Morgan, Frank Jennings

DOCUMENTATION
»Solaris OS
»Sun Studio Compilers/Tools

ARTICLES
»Solaris OS
»Sun Studio Compilers/Tools

DOWNLOADS
»Solaris OS
»Sun Studio Compilers/Tools

RECENT ENTRIES
Archives
Click me to subscribe
Search

Links
 

Today's Page Hits: 27

« New Article: Perform... | Main | SCREENCASTS: Using... »
Friday Jun 08, 2007
New Features in Sun Studio 12 Compilers

Here's what's new and changed in the Sun Studio 12 compilers: 

A New Way To Specify 32-bit or 64-bit Address Model

You no longer need use the -xarch option to specify a 32-bit or 64-bit address model (LP64 versus ILP32). Two new options make it easier:

Deprecated -xarch Flags and Their Replacements Across SPARC and x86

If you are using -xarch=v9 or -xarch=amd64 to specify a 64-bit address model, use just -m64 instead. No -xarch value is required.

Deprecated -xarch Flags and Their Replacements on SPARC Only

Deprecated -xarch Flags and Their Replacements on x86 Only

Disallowed Combinations and Warnings

The compilers do not allow the combination of a deprecated -xarch value and the new -m32, -m64 options on the command line. For example, specifying -xarch=v9 -m32 is now a fatal error. Specifying -xarch=sparc -xarch=v9 is also a fatal error.

Some older -xarch values do not have 64-bit counterparts. You cannot combine the following -xarch options with -m64 on the command line:

  For SPARC platforms: -xarch=v7, -xarch=v8, -xarch=v8a
  For x86 platforms: -xarch=386, -xarch=pentium_pro, -xarch=pentium_proa, -xarch=sse, -xarch=ssea

If you specify a 32-bit -xarch value followed by -m64, the compiler does not issue a warning. For example -m64 -fast or -fast -m64 are allowed. However, if you specify a 64-bit -xarch value followed by -m32, the compiler issues a warning that -m32 overrides the -xarch value. This situation does not occur using macro options, only when an -xarch option has been explicitly specified.

New x86 Features and Updates Common To All Compilers

The following are new x86 flags for the -xarch option:

Changes to -fast Option

The -fast option on x86 now includes -xregs=frameptr, which means that the compiler can use the frameptr register (%ebp on IA32, %rbp on AMD64) as a general purpose register to generate code for all the compilation units. Consequently frame pointers will not be generated in each function or routine.

However, if you want to override this new behavior, specify -xregs=no%frameptr after -fast in the compilation command and the frameptr register will not be used as a general purpose register. The following example demonstrates how to override the -fast default for -xregs:

      cc -fast -xregs=no%frameptr foo.c

New SPARC Features and Updates Common To All Compilers

This release of the Sun Studio compilers includes support for the SPARC64 VI and UltraSPARC T2 processors. Use the following new options to specify these processors:

You can also specify the following -xchip options to generate code for these processors without setting the -xarch value automatically as happens when you use -xtarget:

You can also specify the -xarch values explicitly:

New Math and Visual Instruction Set Support in SPARC64 VI

Specify the following new option if you want to use instructions from the SPARC-V9 instruction set including the UltraSPARC extensions, the Visual Instruction Set (VIS) version 1.0, the UltraSPARC-III extensions, the Visual Instruction Set (VIS) version 2.0, and the SPARC64 VI extensions for floating-point multiply-add:

You must also specify -m32 or -m64 when you specify -xarch=sparcfmaf to get 32-bit code or 64-bit code respectively . When you specify -xarch=sparcfmaf, the compiler predefines the following new values:

Note: You must use -xarch=sparcfmaf in conjunction with the new -fma=fused option detailed below and some optimization level in order for the compiler to find opportunities to use the multiply-add instructions automatically.

New Option for Floating-Point, Fused or Multiply-Add Instructions

Specify the following new option to enable or disable the automatic generation of floating-point, fused, multiply-add instructions:

The none value indicates that the compiler should not generate any floating-point, fused, or multiply-add instructions. The fused value allows the compiler to attempt to find opportunities to improve the performance of the code by using floating-point, fused, or multiply-add instructions.

COMPLETE DOCUMENTATION ON THE SUN STUDIO PORTAL 

 


Posted at 03:49PM Jun 08, 2007 by Richard Friedman in Compilers  | 

Comments:

Post a Comment:
Comments are closed for this entry.