AFP

The AFP option controls the compiler usage of the Additional Floating Point (AFP) registers that are provided by IBM® z/Architecture® processors.

AFP option syntax

Read syntax diagramSkip visual syntax diagramAFP(NOVOLATILEVOLATILE)

Default is: AFP(NOVOLATILE)

Abbreviations are: None

The Enterprise COBOL compiler generates code that uses the full complement of 16 floating point registers (FPR) provided by an IBM z/Architecture processor. These FPRs are as follows:
  • Original FPRs, which are numbered 0, 2, 4, and 6
  • AFP registers, which are numbered 1, 3, 5, 7, and 8-15
AFP(VOLATILE)
If you specify AFP(VOLATILE), the AFP registers 8-15 are considered volatile, which means that they might be changed by a called subprogram. Therefore, the COBOL compiler generates extra code to protect the values in these registers.
AFP(NOVOLATILE)
If you specify AFP(NOVOLATILE), the AFP registers 8-15 are considered nonvolatile, which means that they are known to be unchanged or preserved by every called subprogram. Therefore, the compiler can generate more efficient code sequences for programs with floating point operations. It is the normal z/OS® architecture convention.

AMODE 64 considerations: When the LP(64) compiler option is in effect, the AFP(VOLATILE) option is not supported. If the AFP(VOLATILE) option is specified explicitly, a warning message is issued and the setting is discarded.