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:
-m32 specifies the
ILP32 model: 32-bit ints, longs, and pointer types.
-m64 specifies the LP64
model: 32-bit ints, 64-bit longs and pointers types.
(Note that -m64 is the default on Linux platforms.)
Deprecated -xarch Flags and Their Replacements Across SPARC and
If you are using -xarch=v9
or -xarch=amd64 to specify a
64-bit address model, use just -m64
instead. No -xarch value is
There's a new article on the SDN Sun Studio portal:
By Timothy Jacobson, Sun Microsystems, June 2007
For developers who need faster performance out
of C, C++, or Fortran programs, Sun Studio compilers provide several
efficient methods. Performance tuning has always been a difficult task
knowledge of the machine architecture and instructions. To make this
process easier, the Sun Studio C, C++, and Fortran compilers provide
easy-to-use performance flags.
By using performance flags, developers can quickly improve execution speed.
However, sometimes compiler flags alone do not result in optimum performance. For this reason,
Sun Studio compilers also allow inline assembly code to be placed in critical areas.
The inline code behaves similarly to a function or subroutine call, which enables cleaner,
more readable code and also enables variables to be directly accessed in the inline assembly code.
This paper provides a demonstration of how to measure the performance of a critical piece of code. An
example using a compiler flag and another example using inline assembly code are provided. The
results are compared to show the benefits and differences of each approach.
For demonstration purposes, this paper uses an academic
program to generate the Mandelbrot set. The example Mandelbrot program
is written in C.
Computing all the pixel values of the Mandelbrot set using the Sun
Studio compiler is timed.
Then, optimization flags are used and the computations are timed again.
Finally, example Sun Studio inline assembly
code is used and the computations are timed again and compared with the
previous timings. The examples demonstrate two different
methods for improving performance with the Sun Studio compiler: using
flags and using inline assembly code.
THE REST OF THE ARTICLE IS ON THE SUN STUDIO SDN PORTAL