Accelerator Manual (G06.24+, H06.03+)
Accelerator Performance Issues
Accelerator Manual—527303-002
6-9
Dynamic Procedure Calls
 ! of the address reference @ErrorL above
WHILE work DO ...
•
Programs dynamically computing the address of the targeted TNS instruction 
make a transition into TNS object code if the return point is not a register-exact 
point:
my^marker := my^marker + magic;
•
The Accelerator finds a register-exact point following the call to the C library 
routine setjmp, so the longjmp routine jumps to that point. The following program 
executes completely in accelerated code:
#include <stdio.h>
#include <setjmp.h>
static jmp_buf ebuf;
void fred (void) {
 ...
 longjmp (ebuf, 1);
 ...
}
main (void) {
 if (setjmp (ebuf) == 0) { /* first return */
 fred ();
 }
 else { /* return from longjmp */
 printf ("long jumped!\n");
 }
}
Dynamic Procedure Calls 
When a TAL, C, FORTRAN, or Pascal program calls a procedure passed as a 
parameter, or a TAL or C program calls a procedure stored as a pointer variable, the 
program executes a dynamic procedure call instruction (DPCL). The Accelerator 
correctly predicts the return value sizes of most DPCLs and verifies these predictions 
at run time. Transitions into TNS object code occur when the Accelerator cannot 
predict or incorrectly predicts the return value size of a DPCL.
Dynamic procedure calls cause a transition to TNS code at the return site of the DPCL 
if the calling procedure:
•
Delays storing the result from the DPCL function
•
Stores the result in an indexed variable
•
Stores the result in a variable that is not a 16-bit or 32-bit integer










