Object Code Accelerator Manual

Preparing Programs for Acceleration
Object Code Accelerator Manual528144-003
3-7
Non-Standard Procedure Call or Return RP Values
those of TNS object code, but only if an overflow occurs. It is unlikely that programs
knowingly use left-shift operations that overflow.
Detection Guideline
Look for arithmetic left-shift operations that overflow.
Required Change
Remove arithmetic left-shift operations that overflow from your programs.
Example
In TNS object code, the value of I is 0, while in accelerated object code, I= %100000.
INT I;
I := %040000 << 1; ! Overflow in accelerated object code.
Non-Standard Procedure Call or Return RP Values
Procedures and subprocedures in TAL and C/C++ can return a different number of
words in the register stack than the number declared in the routine’s source code. OCA
determines the return value sizes for most of these procedures from information found
in the Binder region and its control flow analysis. In some cases, OCA predicts the
return value sizes and emits a run-time check to make sure its predictions are correct.
If OCA makes an incorrect prediction, the program makes a transition into TNS code at
that point. OCA, however, does not determine or predict the return value size when the
compiler-declared values in the Binder region conflict with OCAs control flow analysis.
In these rare cases, you must tell OCA the size of the value returned by a procedure.
Required Changes
For TAL programs:
Recode your program. HP recommends that you remove this coding practice from
your programs because it will not be supported in future software releases.
Change your programs to pass parameters using the proper TAL syntax, if
possible. You can also use the RETURNVALSIZE option.
For C/C++ programs:
Recompile your C/C++ program if it contains functions that return the type “void *”
and it was compiled with a version of the HP C/C++ compiler released prior to
01DEC90. You can also use the RETURNVALSIZE option.
Recompile your C/C++ program if it contains functions that return a struct by value
and it was compiled with a version of the HP C/C++ compiler released prior to
15JUN91. You can also use the RETURNVALSIZE option.
For TAL or C programs: