Register Stack Directive

The Itanium architecture provides a mechanism for register renaming. Register renaming is implemented by allocating a register stack frame consisting of input, local, and output registers. These registers can be renamed. These renamable registers map to the general registers r32 through r127. The assembler provides predefined alternate register names for the input, local, and output register areas of the register stack frame. The mapping of these registers to the general registers is determined by the nearest preceding alloc instruction.

Refer to the Intel® Itanium® Architecture Software Developer’s Manual for detailed information about register renaming and for a full description of the alloc instruction.

The .regstk directive replaces the default register mappings defined by a preceding alloc instruction with new mappings. The .regstk directive

does not allocate a new register stack frame.

The .regstk directive has the following format:

.regstk   ins, locals, outs, rotators

Where:

ins

Represents the number of input registers in the general register stack frame.

in0 through inins-1 represent r32 through r31+ins for ins > 0.

locals

Represents the number of local registers in the general register stack frame state.

loc0 through loclocals-1 represent r32+ins through r31+ins+locals for locals > 0.

outs

Represents the number of output registers in the general register stack frame.

out0 through outouts-1 represent r32+ins+locs through r31+ins+locals+outs for outs > 0.

rotators

Represents the number of rotating registers in the general register frame. rotators must be <= ins+locals+outs.

 

The in, loc, and out register names defined by a previous .regstk directive or alloc instruction are visible by all subsequent instructions until the next .regstk directive or alloc instruction is specified.

The alternate register names specified by the operands of the .regstk directive refer to registers in the current register stack frame. If you reference input, local, or output registers using the alternate register names that are not within the current stack frame, the assembler produces an error message.

To prevent referencing the alternate register names, use the .regstk directive without the operands. The operands of a subsequent .regstk directive or alloc instruction redefine the mappings of the alternate register names.

The alloc instruction and .regstk directive do not affect the names of the general registers, r32 through r127.