Rotating Register Directives

General registers, floating-point registers, and predicate registers contain a subset of rotating registers. This subset of rotating registers can be renamed.

The following directives enable the programmer to provide names for one or more registers within each rotating register region:

The .rotx directives assign alternate names and generation numbers for the rotating registers. One generation corresponds to one iteration of a software-pipelined loop. Each copied register is numbered with an index, where the most recent copy of a register has a zero index, such as b[0]. For every loop iteration, the registers within the group are renamed, and become one generation older by incrementing the index by one.

The .rotx directives define the number of instances of each pipeline variable and allocate them in the appropriate rotating register region. You can use an arbitrary name with a subscript-like notation for referencing the current and previous generations of each variable.

The rotating register directives have the following format:

.rotr    name [expression], ...

.rotf    name [expression], ...

.rotp    name [expression], ...

Where:

name

Represents a register name specified by the user, and represents a pipelined variable.

expression

Specifies the number of generations needed for the variable. The expression must be an absolute integer expression with no forward references.

 

When the alias rotating register names are used as instruction operands, they have the following format:

name[expression]

Where:

name

Represents an alias rotating register name defined by one of the rotating register directives.

expression

Represents an absolute integer expression with no forward references. The index must be between 0 and (n-1), where n is the number of generations defined for that name. If the index is negative, or greater than (n-1), the assembler produces an error message.

 

The .rotr, .rotf, and .rotp directives cancel all previous alias names associated with the appropriate register file, before defining new register names. The register files include the general, floating-point, and predicate registers.

If the number of rotating general registers implied by a .rotr directive exceeds the number of rotating registers declared by the nearest preceding alloc instruction, or .regstk directive, the assembler issues a warning.