Hi,
On Tue, 2009-10-27 at 21:20 +0000, Richard Sandiford wrote:
[...]
OK with those changes,
Just applied the above changes, and added one more for not getting the
ra_fp_offset when -pg is not enabled:
@@ -9619,6 +9622,9 @@ mips_for_each_saved_gpr_and_fpr (HOST_WIDE_INT
sp_offset,
for (regno = GP_REG_LAST; regno >= GP_REG_FIRST; regno--)
if (BITSET_P (cfun->machine->frame.mask, regno - GP_REG_FIRST))
{
+ /* Record the ra offset for use by mips_function_profiler. */
+ if (crtl->profile && regno == RETURN_ADDR_REGNUM)
+ cfun->machine->frame.ra_fp_offset = offset + sp_offset;
mips_save_restore_reg (word_mode, regno, offset, fn);
offset -= UNITS_PER_WORD;
}
"crtl->profile &&" was added.