Object Code Accelerator Manual
Preparing Programs for Acceleration
Object Code Accelerator Manual—528144-003
3-9
Non-Standard Procedure Call or Return RP Values
after the RP directive, while at run time the hardware knows that a value is on the
stack.
The OCA option RETURNVALSIZE must be used for this procedure to return the three
values correctly:
RETURNVALSIZE FOO 3
Function f returns the type “void *” in this C example. You must either recompile this
program with a version of the C/C++ compiler released on or after 01DEC90 or specify
a RETURNVALSIZE option.
void *f(void)
{
return((void *) 0);
}
main()
{
char *cp;
cp = f();
}
Instead of recompiling, you can use the following RETURNVALSIZE option to produce
a correctly accelerated program:
RETURNVALSIZE 'f' 2
•
This example shows a function that returns a struct by value. You must either
recompile this program with a version of the C /C++ compiler released on or after
15JUN91 or specify a RETURNVALSIZE option.
#pragma runnable
#include <stdioh> nolist
#include <stdlibh> nolist
struct TAG {
int I;
long L;
R0
R1
R2
R3
R0
R1
R2
R3
TAL compiler view of register
stack at procedure return
Run-time view of register
stack at procedure return
Value
Value
Value
Value
1
VST0302.vdd