For 10.20, the compilers provide the capabilities to build
with specialized instructions to take advantage of performance features
on PA2.0 systems. The +DA2.0 flag provides these features and is
included in the default flags on PA2.0 systems. One of the features
provided by the compiler is the ability to use 64-bit registers
for arithmetic operations to enhance the performance of the compiled
code.
Summary of Change |
 |
Only machines with the PA8000 processor chip are affected.
Code generated with the PA2.0 compiler flag set will use 64-bit
data registers, where appropriate, for arithmetic operations. The
HP-UX operating system has been modified to save and restore 64
bits worth of register information on PA2.0 systems. Applications
that implicitly make use of register information returned by the
operating system via the sigcontext structure will have to be addressed
to handle 64-bit data on PA2.0 systems, unless they include no code
that has been generated with the +DA2.0 compiler flag.
Impact |
 |
Any application that links in any code compiled with the +DA2.0
compiler flag, including any object modules, shared or archived
libraries, and that has signal handlers that access the register
contents in the sigcontext structure must be prepared to handle
64-bit data registers unless the code that is compiled with the
+DA2.0 flag blocks signals. If this is not done, it is possible
that either program termination or data corruption may occur, if
for example, the application restores only 32-bits of a 64-bit data
register and returns to a section of code that needs the 64-bit
data. Note that this interface of accessing the machines registers
is not part of the HP-UX API and its use is not encouraged because
the information is strictly machine-dependent and cannot always
be made compatible as modifications are made to the underlying machine
architecture.
In addition, code that does access the register contents in
the sigcontext structure, will fail the compile process on a HP-UX
10.20 release until it has been re-coded to match new names for
these registers in the sigcontext structure. This data was purposefully
renamed to alert users of the coding changes that may be necessary
to account for the larger data.
As this is not a documented interface, the source code modifications
that will need to be made can be found along with the structure
definition in the save_state.h
header file.
Performance |
 |
The 64-bit data registers feature of the PA2.0 compilers is
meant to increase the performance of the applications that can make
use of 64-bit arithmetic. Performance benefits will be different
depending on how much the application may be able to take advantage
of this feature.
Compatibility |
 |
Applications that are impacted by this feature may abnormally
terminate or result in data corruption until source code changes
are made to the part of the application that accesses the register
information in the savestate portion of the sigcontext structure.
In addition, if the code that accesses the registers is recompiled
on HP-UX 10.20, it will fail the compile until source code modifications
have been made.
Note there is no compatibility issues with this feature if
the +DA2.0 compile flag is not used on any of the code contained
in the application, or if the only code compiled with the +DA2.0
flag has signals blocked, or if the application does not access
the register contents of the sigcontext structure.
As this is not a documented interface, the source code modifications
that will need to be made can be found along with the structure
definition in the save_state.h
header file.