This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

frame_pointer_needed


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]