Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 59

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

The local and output areas of a frame can be re-sized using the alloc instruction which
specifies immediates that determine the size of frame (sof) and size of locals (sol).
Note: In the assembly language, alloc uses three immediate operands to determine
the values of sol and sof: the size of inputs; the size of locals; and the size of
outputs. The value of sol is determined by adding the size of inputs immediate
and the size of locals immediate; the value of sof is determined by adding all
three immediates.
The value of sof specifies the size of the entire stacked subset visible to the current
procedure; the value of sol specifies the size of the local area. The size of the output
area is determined by the difference between sof and sol. The values of these
parameters for the currently active procedure are maintained in the Current Frame
Marker (CFM).
Reading a stacked register outside the current frame will return an undefined result.
Writing a stacked register outside the current frame will cause an Illegal Operation
fault.
When a br.call or brl.call is executed, the CFM is copied to the Previous Frame
Marker (PFM) field in the Previous Function State application register (PFS), and the
callee's frame is created as follows:
• The stacked registers are renamed such that the first register in the caller's output
area becomes GR 32 for the callee
• The size of the local area is set to zero
• The size of the callee's frame (sof
(sof
a
Values in the output area of the caller's register stack frame are visible to the callee.
This overlap permits parameter and return value passing between procedures to take
place entirely in registers.
Procedure frames may be dynamically re-sized by issuing an alloc instruction. An
alloc instruction causes no renaming, but only changes the size of the register stack
frame and the partitioning between local and output areas. Typically, when a procedure
is called, it will allocate some number of local registers for its use (which will include the
parameters passed to it in the caller's output registers), plus an output area (for
passing parameters to procedures it will call). Newly allocated registers (including their
NaT bits) have undefined values.
When a br.ret is executed, CFM is restored from PFM and the register renaming is
restored to the caller's configuration. The PFM is procedure local state and must be
saved and restored by non-leaf procedures. The CFM is not directly accessible in
application programs and is updated only through the execution of calls, returns,
alloc, cover, and clrrrb.
Figure 4-1
(caller) to procB (callee). The state of the register stack is shown at four points: prior to
the call, immediately following the call, after procB has executed an alloc, and after
procB returns to procA.
1:48
- sol
)
a
depicts the behavior of the register stack on a procedure call from procA
) is set to the size of the caller's output area
b1
Volume 1, Part 1: Application Programming Model

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents