Commit 713df810 by Richard Sandiford Committed by Richard Sandiford

mips.c (compute_frame_size): Restore the original gp_sp_offset for…

mips.c (compute_frame_size): Restore the original gp_sp_offset for !GENERATE_MIPS16E_SAVE_RESTORE and remove...

gcc/
	* config/mips/mips.c (compute_frame_size): Restore the original
	gp_sp_offset for !GENERATE_MIPS16E_SAVE_RESTORE and remove the
	fp_size term from the GENERATE_MIPS16E_SAVE_RESTORE calculation.
	Document why the difference is needed.

From-SVN: r126406
parent b5119fa1
2007-07-06 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.c (compute_frame_size): Restore the original
gp_sp_offset for !GENERATE_MIPS16E_SAVE_RESTORE and remove the
fp_size term from the GENERATE_MIPS16E_SAVE_RESTORE calculation.
Document why the difference is needed.
2007-07-06 Richard Guenther <rguenther@suse.de> 2007-07-06 Richard Guenther <rguenther@suse.de>
* c-common.c (boolean_increment): Use correctly typed * c-common.c (boolean_increment): Use correctly typed
......
...@@ -6781,12 +6781,16 @@ compute_frame_size (HOST_WIDE_INT size) ...@@ -6781,12 +6781,16 @@ compute_frame_size (HOST_WIDE_INT size)
{ {
HOST_WIDE_INT offset; HOST_WIDE_INT offset;
/* MIPS16e SAVE and RESTORE instructions require the GP save area if (GENERATE_MIPS16E_SAVE_RESTORE)
to be aligned at the high end with any padding at the low end, /* MIPS16e SAVE and RESTORE instructions require the GP save area
so do it that way all the time. */ to be aligned at the high end with any padding at the low end.
offset = (total_size It is only safe to use this calculation for o32, where we never
- MIPS_STACK_ALIGN (fp_reg_size) have pretend arguments, and where any varargs will be saved in
- GET_MODE_SIZE (gpr_mode)); the caller-allocated area rather than at the top of the frame. */
offset = (total_size - GET_MODE_SIZE (gpr_mode));
else
offset = (args_size + cprestore_size + var_size
+ gp_reg_size - GET_MODE_SIZE (gpr_mode));
cfun->machine->frame.gp_sp_offset = offset; cfun->machine->frame.gp_sp_offset = offset;
cfun->machine->frame.gp_save_offset = offset - total_size; cfun->machine->frame.gp_save_offset = offset - total_size;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment