This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
frame_pointer_needed
- To: <gcc at gcc dot gnu dot org>
- Subject: frame_pointer_needed
- From: "Dragos Badea" <Dragos dot Badea at cs dot pub dot ro>
- Date: Tue, 23 May 2000 16:16:35 +0300
In my machine description files the following are written:
#define FIRST_PARM_OFFSET(FUNDECL) (frame_pointer_needed?-16:-8)
and in function_prologue:
[....]
if (frame_pointer_needed)
{ fprintf (file, "\tpush\tr6\tpush\tr7\n");
[....]
}
When offsets are computed in function.c, frame_pointer_needed is 0 so
that
in_arg_offset is set to -8 but when function_prologue is called
frame_pointer_needed is 1
and the two registers will be pushed(r7 stands for frame pointer). This
inconsistency should not exist.
The asm code will be wrong when incoming arguments passed on stack are
used because the offset should have been -16 and not -8.
Any ideas?
Adrian,
thank you