Accelerator Manual (G06.24+, H06.03+)
Accelerator Manual—527303-002
3-1
3 Preparing Your Program for the
Accelerator
Most TNS programs written since the C30 versions of the operating system can be
accelerated without modification. Variances between TNS and TNS/R systems that
affect accelerated code only might require modification in some programs, particularly
low-level TAL programs.
In this section:
•
General Considerations on page 3-1, discusses software development issues that
significantly affect the performance of accelerated code.
•
Variances in Accelerated Code on page 3-2, discusses the changes you must
make to programs because of variances between TNS and TNS/R systems that
apply to accelerated object code only.
This section assumes that you have already prepared your programs for TNS/R
systems, as described in Section 2, Preparing Your Program for TNS/R Systems.
General Considerations
The following software development issues significantly affect the performance of
accelerated programs. Note that none of these issues is a variance.
Run-Time Libraries
The C/C++, COBOL85, FORTRAN, Pascal, TAL run-time libraries, and the Common
Run-Time Environment (CRE) library, are configured as part of the system library on D-
series and G-series systems. These run-time library routines have already been
accelerated for TNS/R systems. To save time in accelerating your programs and to
produce the smallest possible accelerated object files, do not bind the run-time library
routines into your programs. In particular, HP recommends that you do not bind
COBOL85 run-time library routines into your COBOL85 application programs. At the
time of process creation, the operating system resolves external references to run-time
library routines.
You must continue to bind into programs that contain C/C++ routines the appropriate
C/C++ model-dependent library file, such as CLARGE or CWIDE. Refer to the C/C++
Programmer’s Guide for details.
C Function Prototypes
The C/C++ compiler uses function prototypes to determine the return value size for
calls to routines declared in separate modules or to routines declared later in the same
module. If you do not specify a function protoype, the C/C++ compiler assumes the
function returns an INT value. On the TNS architecture, the object code runs correctly
if either the function returns an INT value or no value. The Accelerator generates code