-qvrsave

Category

Object code control

Pragma equivalent

#pragma altivec_vrsave

Purpose

Enables code in function prologs and epilogs to maintain the VRSAVE register.

Each bit in the VRSAVE register corresponds to a vector register and, if set to 1, indicates that the corresponding vector register contains data to be saved when a context switch occurs. Use -qvrsave to indicate to the compiler that functions in the compilation unit include code needed to maintain the VRSAVE register. Use -qnovrsave to indicate to the compiler that functions in the compilation unit do not include code needed to maintain the VRSAVE register.

You can use the pragma to override the current setting of the compiler option for individual functions within your program source.

Syntax

Read syntax diagramSkip visual syntax diagram
Option syntax

        .-vrsave---.   
>>- -q--+-novrsave-+-------------------------------------------><

Read syntax diagramSkip visual syntax diagram
Pragma syntax

                              .-on----.   
>>-#--pragma--altivec_vrsave--+-off---+------------------------><
                              '-allon-'   

Defaults

vrsave: The VRSAVE register is always maintained.

Parameters

on (pragma only)
Function prologs and epilogs include code to maintain the VRSAVE register.
off (pragma only)
Function prologs and epilogs do not include code to maintain the VRSAVE register.
allon (pragma only)
The function containing pragma sets all bits of the VRSAVE register to 1, indicating that all vectors are used and should be saved if a context switch occurs.

Usage

This option and pragma are only supported when -qaltivec is in effect.

The pragma can be used only within a function, and its effects apply only to the function in which it appears. Specifying this pragma with different settings within the same function will create an error condition.

Predefined macros

None.

Related information