AFP
The AFP
option controls the compiler usage of the Additional Floating Point (AFP) registers that are provided by IBM® z/Architecture® processors.
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
- Default
AFP=NOVOLATILE
- 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 additional code to protect the values in these registers. - 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 option is specified explicitly by the user,
an informational message is issued and the setting is ignored.