This is the mail archive of the
mailing list for the GCC project.
MIPS stack frame question
- From: Masao Uebayashi <uebayasi at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 28 May 2008 11:14:23 +0900 (JST)
- Subject: MIPS stack frame question
I'm trying to figure out the structure of MIPS stack frame and how to
write .frame / .mask properly. Since gcc/config/mips/mips.c was
rewritten by Richard Sandiford, it got clearer that what GCC does
(thanks for that).
- In gcc/config/mips/mips.c:mips_compute_frame_info() you do
/* Move above the GPR save area. */
if (frame->num_gp > 0)
offset += MIPS_STACK_ALIGN (frame->num_gp * UNITS_PER_WORD);
frame->gp_sp_offset = offset - UNITS_PER_WORD;
So what is "- UNITS_PER_WORD" for?
- Why do you put MIPS_STACK_ALIGN in many places? The only constraint
I know is that MIPSpro Assembly Language Programmer's Guide  says
"The stack framesize must be a multiple of 16".
- Could you document / comment the reason / source of such
specifications about all of these? :)
Thanks in advance.