HP C A.06.05 Reference Manual

Compiling and Running HP C Programs
Pragmas
Chapter 9232
FastCall Pragmas
The compiler directives described in this section are designed to speed up shared library calls.
HP_DEFINED_EXTERNAL Pragma
#pragma HP_DEFINED_EXTERNAL sym1, sym2, ...
The externally defined symbol pragma specifies that the designated symbols are imported
from another load module (program file or shared library). Note that this pragma currently
works in 32-bit mode only. For 64-bit mode, use the option +Oextern.
HP_LONG_RETURN Pragma
#pragma HP_LONG_RETURN func1, func2, ...
The long return sequence pragma specifies that the named procedures can return directly
across a space, without needing to return through an export stub. The main goal of this
pragma is to eliminate export stubs, and better enable inlining of import stubs and $$dyncall
functionality for indirect calls.
HP_NO_RELOCATION Pragma
#pragma HP_NO_RELOCATION func1, func2, ...
The no parameter/return relocation pragma is used to suppress unnecessary floating point
argument relocation. When used, the burden is on the caller and callee to have their
argument and their return values agree in which register files they are passed.
Gather/Scatter Prefetch Pragma
This release supports pragmas for prefetching the cache lines specified in the pragma.
Syntax
#pragma prefetch <argument>
The behavior of this pragma is similar to the HP_OPT_DATA pragma which prefetches the data
specified. But the prefetch pragma can access cache lines that are accessed via a vector of
indices.
<argument> can have only one argument per pragma and it must me an array element. For
example, a[i].
The compiler generates instructions to prefetch the cache lines starting from the address of an
argument. The values prefetched must be valid values. Reading off the end of an array may
result in undefined behavior during runtime.