Contents
1. Sun Studio Express 5/08 Software
2. New and Changed Features Since Sun Studio 12 Release
3. Update Notification
4. Usage Tracking Enabled
5. Feature Details
1. Sun Studio Express 5/08 Software
Welcome to the Sun Studio Express Program, your opportunity to get an early
look at the technology and features going into the next release of Sun Studio
software. We look forward not only to your bug
reports and requests for future enhancements (RFEs), but also to
your feedback via the Sun Studio Tools Forum, which will shape future product decisions.
Sun Studio Express 5/08 software is available only to OpenSolaris 2008.05 users from the
default pkg.opensolaris.org repository. For information on how to
download and install Sun Studio Express 5/08 software, see
How
to Install Sun Studio Express 5/08.
This page will provide you with information specific to this release.
The man pages and other documentation in the Sun Studio Express 5/08 bits have
not all been updated yet. The Sun Studio Information Center
links to all the manuals, man pages, and readmes for Sun Studio 12 software,
which is the latest production release.
2. New and Changed Features Since Sun Studio 12 Release
Here is an overview of some of the new features in this Express build of Sun
Studio compilers and tools. Note that most of these features might not be
documented in the Sun Studio man pages in this build. For more detail on these
features, see Feature Details.
Some of these features are experimental and might not be available in future
releases. Some of these features might change significantly in future releases.
The documentation is also preliminary and might not reflect the full range of
functionality or problems and workarounds.
IDE
- Based on NetBeans IDE 6.0
- Include Hierarchy lets you inspect the hierarchy
of source and header files
- Type Hierarchy lets you inspect all
supertypes and subtypes of a class
- New toolbar button lets you toggle between corresponding source and header files
- Code completion now works for
#include directives
- New Go to Type menu item lets you find a type (class, struct, enum, or typedef)
by its name or prefix
- New Go to Include menu item lets you go directly to a file that is included in
a source or header file
- New Go to Function or Variable menu item lets you find a function or variable
by its name or prefix
- Project dependencies can be created for projects from existing code
C compiler
__FUNCTION__ is a predefined identifier that contains the
name of the lexically-enclosing function. It is functionally equivalent to the
c99 predefined identifier, __func__. On Solaris platforms,
__FUNCTION__ is not available in -Xs
and -Xc modes.
- The
-xcrossfile=1 option becomes an alias of the
-xipo=1 option. -xcrossfile no longer has any
effect.
C++ compiler
- The
-xia option is now supported by the C++ compiler on the
Solaris OS on x86 platforms. This option links the appropriate interval
arithmetic libraries and sets a suitable floating-point environment.
- The C++ compiler now inlines code when you specify
-g
with any -0 or -x0 value as long as you do not
also specify +d.
- The
-xcrossfile=1 option becomes an alias of the
-xipo=1 option. -xcrossfile no longer has any
effect.
Fortran compiler
- The
-xcrossfile=1 option becomes an alias of the
-xipo=1 option. -xcrossfile no longer has any
effect.
Compilers on x86 platforms
- SSSE3 Assembly syntax/semantic and corresponding compiler intrinsics
Assembler on x86 platforms
- Two new assembler options:
-C and -a32
dbx debugger
- Runtime checking (RTC) now gives information about array out-of-bounds
access on the Solaris OS on x86 platforms.
Project D-Light
Project D-Light is a plugin for the Sun Studio 12 IDE that offers a variety
of instrumentation that takes advantage of the Dynamic Tracing (DTrace)
debugging and performance analysis functionality in the Solaris OS.
3. Update Notification
The Update Notification feature periodically checks www.sun.com and communicates
available changes related to your Sun Studio software, including patches and major
software updates. In this Sun Studio Express build, only usage information is communicated. This
information is used by Sun Microsystems to improve future Sun Studio software
releases. This information is anonymous and cannot be associated to any individual or
organization.
To disable Update Notification, set the SUNW_NO_UPDATE_NOTIFY environment
variable to any value other than false.
4. Usage Tracking Enabled
Usage tracking provides a way for Sun software engineers to
collect information about how developers use Sun compilers and tools.
This information can then be used to improve future revisions of the
products.
Usage tracking is enabled in this Express release.
Usage tracking captures the compiler and tools command options
that you specify. Usage tracking also uses the uname -a
command to capture platform information and operating system
information from the runtime environment. No file names, directory
names, or macros are collected. For example, you might issue the
following command:
CC -DMACRO -L/directory1 -I/directory2 -Xa -O hello.cc
In this case, only the following information is reported back to
Sun:
CC -D -L -I -Xa -O
Each time a compiler or tool is invoked, the options that are used
are logged in the file /tmp/.UT... The log file is sent
to Sun software engineers if the file exceeds 10 Kbytes or is more than
24 hours old.
You can turn off usage tracking by defining the environment
variable UT_NO_USAGE_TRACKING before running any of the
Sun compilers and tools.
(with csh) % setenv UT_NO_USAGE_TRACKING
(with ksh) $ export UT_NO_USAGE_TRACKING
(with sh) $ set UT_NO_USAGE_TRACKING; export
UT_NO_USAGE_TRACKING
5. Feature Details
Here are further details on some of the new features in this Express build of Sun
Studio compilers and tools. Note that most of these features may not be documented
in the Sun Studio man pages in this build.
Some of these features are experimental and may not be available
in future releases. Some of these features may change significantly
in future releases. The documentation is also preliminary and may
not reflect the full range of functionality or problems and workarounds.
IDE
The IDE in this Sun Studio Express release is based on NetBeans IDE 6.0, and
includes the following new features:
- Include Hierarchy, opened by right-clicking in a source or header file and
choosing Navigate > Inspect Includes Hierarchy, lets you inspect the hierarchy
of source and header files
- Type Hierarchy, opened by right-clicking on a class declaration or class
reference and choosing Navigate > Inspect Type Hierarchy, lets you inspect
all supertypes and subtypes of a class
- New toolbar button lets you toggle between corresponding source and header files
- Code completion now works for
#include directives
- New Go to Type menu item lets you find a type (class, struct, enum, or typedef)
by its name or prefix
- New Go to Include menu item lets you go directly to a file that is included in
a source or header file
- New Go to Function or Variable menu item lets you find a function or variable
by its name or prefix
- Project dependencies can be created for projects from existing code
sunstudio Command Options
The following changes have been made to the options of the
sunstudio command:
-
The
--enablejava and --disablejava options have
been removed. You can now use the Plugin Manager (Tools > Plugins) to
enable and disable the Java plugins.
- The format of the
--ui-classpath path option, which
appends the specified path to the IDE's classpath, has changed to
--cp:apath.
Backward Compatibility of Projects
-
NetBeans IDE 6.0 includes C/C++ Development Pack 6.0, which supports
project version 39 and older.
- The IDE in the Sun Studio 12 multi-language release was based on
NetBeans C/C++ Development Pack 5.5.1 update 1 and supports project
version 38 and older.
- The IDE in the Sun Studio 12 English-only release was based on NetBeans
C/C++ Development Pack 5.5.1 and supports project version 27 and older.
If you open a project with the IDE in this Express release, you
might not be able to open the project with the IDE in the Sun Studio
12 multi-language release or any previous release.
When the IDE opens a project with a lower version number than it
supports, it does so without any warnings. If you modify the
project, the project system silently upgrades it to the current project
version. The project system doesn't update the project's meta data if you
don't modify the project.
When the IDE encounters a higher project version than it supports,
it shows an error dialog that states the project version is not
supported and you need a newer version of the IDE to open the
project. The project's meta data is not modified. The unopened
project can still be built as a sub-project from within the IDE or
from command line (the IDE in the Sun Studio 12 multi-language
release throws an exception but it is benign).
This behavior is not new. Projects have had this behavior in Sun
Studio releases based on NetBeans C/C++ Development Pack 5.0, 5.5, 5.5.1,
and 5.5.1 update 1.
The project version of a project can be found in the
configurations.xml file in the nbproject folder
of the project. For example:
grep version Welcome/nbproject/configurations.xml
<configurationDescriptor version ="39">
By default, projects are created in ~/SunStudioProjects.
C compiler
Option changes:
-
The
-xcrossfile=1 option becomes an alias of -xipo=1
option. -xcrossfile=0 no longer has any effect.
-
The
-Y option doesn't accept "i" as argument.
-
The
-W option doesn't accept "i" as argument.
__FUNCTION__ is a predefined identifier that contains the name
of the lexically-enclosing function. It is functionally equivalent to the
c99 predefined identifier, __func__. On Solaris platforms,
__FUNCTION__ is not available in -Xs and
-Xc modes.
C++ compiler
Option changes:
-
The
-xcrossfile=1 option becomes an alias of
-xipo=1 option. -xcrossfile=0 no longer has
any effect.
-
The
-Y option doesn't accept "i" as an
argument.
-
The
-Qoption option doesn't accept "ube_ipa"
as an argument.
-
The
-xia option is now supported by the C++ compiler on
x86 platforms. This option links the appropriate interval arithmetic
libraries and set a suitable floating-point environment. The
-xia is a macro which expands to -fsimple=0
-ftrap=%none -fns=no -library=interval. This option also
requires that you specify an -xarch value that supports
SSE2 instructions, such as -xarch=sse2.
See CC.1 for more information.
The C++ compiler now inlines code when you specify -g
with any -0 or -x0 value as long as you do
not also specify +d. In previous releases, -g
automatically specified +d, but this is no longer the case.
Fortran compiler
Option changes:
-
The
-xcrossfile=1 option becomes an alias of
-xipo=1 option. The -xcrossfile=0 no longer
has any effect.
- The
-Qoption option doesn't accept
"ube_ipa" as an argument.
Compilers on x86 platforms
SSSE3 Assembly Syntax/Semantic and Corresponding Compiler Intrinsics
PSIGNB, PSIGNW, PSIGND
- Syntax: psignb/psignw/psignd mem64/mmxreg, mmxreg
psignb/psignw/psignd mem128/xmmxreg, xmmxreg
- Semantic: Packed Sign
- Corresponding intrinsics:
extern __m64 _mm_sign_pi8 (__m64 p1, __m64 p2);
extern __m64 _mm_sign_pi16 (__m64 p1, __m64 p2);
extern __m64 _mm_sign_pi32 (__m64 p1, __m64 p2);
extern __m128i _mm_sign_epi8 (__m128i p1, __m128i p2);
extern __m128i _mm_sign_epi16 (__m128i p1, __m128i p2);
extern __m128i _mm_sign_epi32 (__m128i p1, __m128i p2);
PABSB, PABSW, PABSD
- Syntax: pabsb/pabsw/pabsd mem64/mmxreg, mmxreg
pabsb/pabsw/pabsd mem128/xmmxreg, xmmxreg
- Semantic: Packed Absolute Value
- Corresponding intrinsics:
extern __m64 _mm_abs_pi8 (__m64 p);
extern __m64 _mm_abs_pi16 (__m64 p);
extern __m64 _mm_abs_pi32 (__m64 p);
extern __m128i _mm_abs_epi8 (__m128i p);
extern __m128i _mm_abs_epi16 (__m128i p);
extern __m128i _mm_abs_epi32 (__m128i p);
PALIGNR
- Syntax: palignr imm, mem64/mmxreg, mmxreg
palignr imm, mem128/xmmreg, xmmreg
- Semantic: Packed Align Right
- Corresponding intrinsics:
extern __m64 _mm_alignr_pi8 (__m64 p1, __m64 p2, int immd);
extern __m128i _mm_alignr_epi8 (__m128i p1, __m128i p2, int immd);
PSHUFB
- Syntax: pshufb mem64/mmxreg, mmxreg
pshufb mem128/xmmxreg, xmmxreg
- Semantic: Packed Shuffle Bytes
- Corresponding intrinsics:
extern __m64 _mm_shuffle_pi8 (__m64 p1, __m64 p2);
extern __m128i _mm_shuffle_epi8 (__m128i p1, __m128i p2);
PMULHRSW
- Syntax: pmulhrsw mem64/mmxreg, mmxreg
pmulhrsw mem128/xmmxreg, xmmxreg
- Semantic: Packed Multiply High with Round and Scale
- Corresponding intrinsics:
extern __m64 _mm_mulhrs_pi16 (__m64 p1, __m64 p2);
extern __m128i _mm_mulhrs_epi16 (__m128i p1, __m128i p2);
PMADDUBSW
- Syntax: pmaddubsw mem64/mmxreg, mmxreg
pmaddubsw mem128/xmmxreg, xmmxreg
- Semantic: Multiply and Add Packed Signed and Unsigned Bytes
- Corresponding intrinsics:
extern __m64 _mm_maddubs_pi16 (__m64 p1, __m64 p2);
extern __m128i _mm_maddubs_epi16 (__m128i p1, __m128i p2);
PHSUBW, PHSUBD
- Syntax: phsubw/phsubd mem64/mmxreg, mmxreg
phsubw/phsubd mem128/xmmxreg, xmmxreg
- Semantic: Packed Horizontal Subtract
- Corresponding intrinsics:
extern __m64 _mm_hsub_pi16 (__m64 p1, __m64 p2);
extern __m64 _mm_hsub_pi32 (__m64 p1, __m64 p2);
extern __m128i _mm_hsub_epi16 (__m128i p1, __m128i p2);
extern __m128i _mm_hsub_epi32 (__m128i p1, __m128i p2);
PHSUBSW
- Syntax: phsubsw mem64/mmxreg, mmxreg
phsubsw mem128/xmmxreg, xmmxreg
- Semantic: Packed Horizontal Subtract and Saturate Words
- Corresponding intrinsics:
extern __m64 _mm_hsubs_pi16 (__m64 p1, __m64 p2);
extern __m128i _mm_hsubs_epi16 (__m128i p1, __m128i p2);
PHADDW, PHADDD
- Syntax: phaddw/phaddd mem64/mmxreg, mmxreg
phaddw/phaddd mem128/xmmxreg, xmmxreg
- Semantic: Packed Horizontal Add
- Corresponding intrinsics:
extern __m64 _mm_hadd_pi16 (__m64 p1, __m64 p2);
extern __m64 _mm_hadd_pi32 (__m64 p1, __m64 p2);
extern __m128i _mm_hadd_epi16 (__m128i p1, __m128i p2);
extern __m128i _mm_hadd_epi32 (__m128i p1, __m128i p2);
PHADDSW
- Syntax: phaddsw mem64/mmxreg, mmxreg
phaddsw mem128/xmmxreg, xmmxreg
- Semantic: Packed Horizontal Add and Saturate Words
- Corresponding intrinsics:
extern __m64 _mm_hadds_pi16 (__m64 p1, __m64 p2);
extern __m128i _mm_hadds_epi16 (__m128i p1, __m128i p2);
Assembler on x86 platforms
There are two new assembler options:
-
-C: In general you do not need -C to be GNU
Assembler compatible; -C is needed only in several
situations to make the semantic compatible. Refer to the changes below.
-
-a32: To allow 32-bit memory addresses in -m64
64-bit mode.
Major area of changes:
-
For mnemonics without suffix, the presence of register operand
determines the suffix implicitly. If size of operation can not be
determined due to absence of register operand, an error is issued if
the option
-C was used, otherwise the suffix defaults
to 'l'. For example
mov $10, %ax
can now be used for
movw $10, %ax
Note if we have
mov $10, mem
the Sun Studio Assembler defaults to
movl $10, mem
but gives an error if -C is used, to be compatible with
the GNU Assembler.
-
Allow all 16-bit instructions to accept 32-bit register operands,
but to issue warning if the
-C option is used.
-
Allow 32-bit addresses under 64-bit mode using the new option
-a32. For example, the command
fbe -m64 -a32 file.s
can assemble
lea 123(%eax,%r10d),%eax
-
A program can now have more than 10 local labels, a local label can
now be as large as a 32-bit integer.
-
You can now place
lock/rep/repnz/repz/repe/repne
prefix on the same line as the following instruction.
-
GNU Assembler compatible instruction synonyms have been added:
cbw==cwtd, cwd==cwtd, cwde==cwtl, cdq==cltd, cdqe==cltq, cqo==cqto,
movzb==movzbl, sysret==sysretl
-
GNU Assembler compatible assembler directives have been added:
.p2align,.extern,.global,.equiv
-
One obsolete option:
-b generates extra symbol table
information for the SourceBrowser, which is now obsolete.
dbx debugger
Runtime checking (RTC) now gives information about array out-of-bounds
access on the Solaris OS on x86 platforms. Runtime Checking reports the
following
array out-of-bounds errors:
rob Read from array out-of-bounds memory
wob Write to array out-of-bounds memory
Project D-Light
The objective of Project D-Light is to make sophisticated application and
system profiling, accessible. There are many tools that profile
applications and there are other tool that profile the system stack,
but there are few tools that can join these views into an easy to use
interface. For the first time, you can optimize your application
and system environment by visualizing performance bottlenecks and
resource contention up and down the application system stack.
Using an intuitive drag and drop interface, Project D-Light provides
an extensible library of instruments that represent the latest advances
of profiling technology, including Solaris Dynamic Tracing (DTrace).
With instruments like CPU accountant and Sampler, developers can use the
interactive GUI to quickly profile and peer into the runtime behavior
of their applications.
For more information on using D-Light refer to the
Project D-Light Tutorial
(Last updated April 4, 2008)