m68k.md (m68k_output_function_prologue): Always call dwarf2out_def_cfa.

2005-12-17  Paul Brook  <paul@codesourcery.com>

	* config/m68k/m68k.md (m68k_output_function_prologue): Always call
	dwarf2out_def_cfa. Only add space for frame pointer to cfa_offset
	when frame_pointer_needed.

From-SVN: r108725
This commit is contained in:
Paul Brook 2005-12-17 23:29:21 +00:00 committed by Paul Brook
parent cceb18855e
commit d9e88af0e2
2 changed files with 24 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2005-12-17 Paul Brook <paul@codesourcery.com>
* config/m68k/m68k.md (m68k_output_function_prologue): Always call
dwarf2out_def_cfa. Only add space for frame pointer to cfa_offset
when frame_pointer_needed.
2005-12-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
* tree-inline.c (copy_body_r): Use explicit cast when converting

View File

@ -559,16 +559,6 @@ m68k_output_function_prologue (FILE *stream,
"\tlink" ASM_DOTW " %s,%I0\n"
"\tadd" ASM_DOT "l %I%wd,%Rsp\n",
M68K_REGNAME (FRAME_POINTER_REGNUM), -fsize_with_regs);
if (dwarf2out_do_frame ())
{
char *l;
l = (char *) dwarf2out_cfi_label ();
cfa_offset += 4;
dwarf2out_reg_save (l, FRAME_POINTER_REGNUM, -cfa_offset);
dwarf2out_def_cfa (l, FRAME_POINTER_REGNUM, cfa_offset);
cfa_offset += current_frame.size;
}
}
else if (fsize_with_regs) /* !frame_pointer_needed */
{
@ -603,14 +593,26 @@ m68k_output_function_prologue (FILE *stream,
else /* fsize_with_regs >= 0x8000 */
asm_fprintf (stream, "\tadd" ASM_DOT "l %I%wd,%Rsp\n",
-fsize_with_regs);
if (dwarf2out_do_frame ())
{
cfa_offset += current_frame.size + 4;
dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, cfa_offset);
}
} /* !frame_pointer_needed */
if (dwarf2out_do_frame ())
{
if (frame_pointer_needed)
{
cfa_offset += current_frame.size + 4;
char *l;
l = (char *) dwarf2out_cfi_label ();
cfa_offset += 4; + dwarf2out_reg_save (l, FRAME_POINTER_REGNUM, -cfa_offset);
dwarf2out_def_cfa (l, FRAME_POINTER_REGNUM, cfa_offset);
cfa_offset += current_frame.size;
}
else
{
cfa_offset += current_frame.size;
dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, cfa_offset);
}
}
if (current_frame.fpu_mask)
{
asm_fprintf (stream, (MOTOROLA