HP 3000 Manuals

LONG_CALLS [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation


HP Pascal/iX Reference Manual

LONG_CALLS 

LONG_CALLS is an HP Pascal option.

The LONG_CALLS option can be used to change the type of branches that are
generated for calls or millicode calls.

Syntax 

            {integer}
$LONG_CALLS {ON     }$
            {OFF    }
Parameters 

0 or OFF      Regular short calls are generated.

1 or ON       Long calls are generated for regular calls and millicode
              calls.

2             Millicode calls are long and regular calls are short.

3             Millicode calls are short and regular calls are long.

Default         MPE/iX        0

              On HP-UX      0 if any one of the following options are
                            used:

                                 -O   +O   +z   +Z

                            3 if none of the above options are used.

Location      Anywhere, but in order to be effective, it must appear
              before a place in the code where label declarations or
              directives can appear.

Normally, for small programs, the branches generated reach their targets.
If the branch does not reach, the linker generates Long Branch stubs.
These stubs take longer to execute and may change the program's locality.
These stubs are shared within a subspace, with one or more procedures.

By using the LONG_CALLS options, the compiler can generate a different
and longer code sequence that always reach the branch.  The disadvantage
of using the longer call sequence is that the longer call sequence is
done on calls that do reach the branch.  This causes a code expansion for
every call.

For HP-UX, millicode calls usually reach in program files, so options 1
and 2 are not needed.  Also, they are not needed when compiling with +z
or +Z (or SHLIB_CODE).

See the Procedure Calling Conventions Reference Manual and the Precision 
Architecture Instruction Set Reference Manual for more information on
stubs and branches.

Example 

     $LONG_CALLS 1$
     program call;
     procedure p_r(x:real); external;
     begin
       p_r(1.5);
     end.



MPE/iX 5.0 Documentation