Accelerator Manual (G06.27+, H06.04+, J06.03+)
Preparing Your Program for the Accelerator
Accelerator Manual—527303-003
3-9
Non-Standard Procedure Call or Return RP Values
option for functions where the number of words returned is dependent upon
run-time logic.
Examples
•
The declared size of a function (procedure or subprocedure) return result value in
the Binder region must match the actual return size or the Accelerator generates
incorrect code. The following TAL procedure returns three words implicitly and two
words explicitly.
INT(32) PROC foo; ! Actually returns INT48
BEGIN
INT tag;
INT(32) value;
STACK 1; ! Put value on stack when not defined
?RP=7 ! Lie to TAL, suppress warning
RETURN 2d; ! Defined return value, does not match
! value returned on the stack
END;
•
This shows how the TAL compiler view of the register stack differs from the actual
run-time register stack. The TAL compiler determines that the register stack is
empty after the RP directive, while at run time the hardware knows that a value is
on the stack.
The Accelerator issues Warning 32 for procedure Foo:
Warning 32: The return value sizes derived for the following
procedures conflict with those given in the Binder region:
'FOO'; 3 derived by the Accelerator;
2 given in the Binder region
Acceleration is based on the Binder region; you can override
that value with a ReturnValSize option.
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