-qvecnvol

Category

Portability and migration

Pragma equivalent

None.

Purpose

Specifies whether to use volatile or non-volatile vector registers.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-novecnvol .   
>>- -q--+-vecnvol --+------------------------------------------><

Defaults

-qnovecnvol

Usage

Volatile vector registers are those whose value is not preserved across function calls or across save context, jump or switch context system library functions. When -qvecnvol is in effect, the compiler uses both volatile and non-volatile vector registers. When -qnovecnvol is in effect, the compiler uses only volatile vector registers.

This option is required for programs where there is risk of interaction between modules built with AIX® libraries before AIX 5.3TL3 and vector register use. Restricting the compiler to use only volatile registers will make your vector programs safe but it potentially forces the compiler to store vector data to memory more often and therefore results in reducing performance.

Notes:
  • This option requires platforms that support vector instructions.
  • The -qnovecnvol option performs independently from -qsimd=auto | noauto, -qaltivec | -qnoaltivec and pragma=nosimd.
  • Before AIX 5.3TL3, by default only 20 volatile registers (vr0-vr19) are used, and 12 non-volatile vector registers (vr20 - vr31) are not used. You can use these registers only when -qvecnvol is in effect.
  • -qvecnvol should be enabled only when no legacy code that saves and restores non-volatile registers is involved. Using -qvecnvol and linking with legacy code, may result runtime failure.

Predefined macros

None.

Related information