frame pointer
- From: Christian Christmann <plfriko@xxxxxxxx>
- Date: Sun, 30 Apr 2006 13:40:51 +0200
Hi,
I'm learning MIPS assembly programming. In couple of examples
I went through, the authors save the "frame pointer" with
sw $fp 8($sp) # sp is stack pointer
onto the stack.
However, after returning from a routine accessed by a jump instruction
(like JAL label, "JAL" = jump&link return address), they restore the
stored values using $fp like
lw $ra -4($fp).
What is the general purpose of a frame pointer and why is in the
aforementioned examples not the stack pointer "$sp" used for
saving and restoring context values?
Thank you.
Chris
.
- Follow-Ups:
- Re: frame pointer
- From: Julienne Walker
- Re: frame pointer
- Prev by Date: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- Next by Date: Re: frame pointer
- Previous by thread: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- Next by thread: Re: frame pointer
- Index(es):
Relevant Pages
|