On Entry; To Return From A Procedure - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

C/C++ Run-Time Model and Environment

On Entry:

1. Save the old
2. If
-no_hardware_pc_stack
stack and store it on the main stack.
3. Move the
4. If
is specified but
-g
the return address back onto the hardware stack.
After this step, the new frame is officially in place.
5. Continue saving registers, and then executing the procedure.
A leaf procedure which does not require much stack space might choose to
omit steps (1) and (2), operating without its own stack frame. On the
ADSP-219x DSPs, the 32 words of protected space beyond the
used for temporary storage.

To Return from a Procedure:

1. If the hardware PC stack is not used, the return address must be
loaded from the stack and restored.
2. Restore miscellaneous saved registers.
3. Place the return value in the correct register (if not there already).
4. Restore
5. Reset
SP
6. Return to the caller.
1-160
and set
FP
FP
to create space for the new frame.
SP
-no_hardware_pc_stack
for the previous frame.
FP
to remove the frame for procedure.
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
to current
.
SP
is specified (for debugging), pop the PC
is not specified, push
can be
SP
for ADSP-219x DSPs

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Table of Contents