From 54576bcb0658c449102a01c4b2a08db76a3056af Mon Sep 17 00:00:00 2001 From: pbrook Date: Sat, 17 Dec 2005 23:29:21 +0000 Subject: [PATCH] 2005-12-17 Paul Brook * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108725 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/m68k/m68k.c | 32 +++++++++++++++++--------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e023f52..a2056a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-12-17 Paul Brook + + * 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 * tree-inline.c (copy_body_r): Use explicit cast when converting diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 2462bb1..2ef980f 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -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,13 +593,25 @@ 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); + } /* !frame_pointer_needed */ - if (dwarf2out_do_frame ()) + if (dwarf2out_do_frame ()) + { + if (frame_pointer_needed) { - cfa_offset += current_frame.size + 4; - dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, cfa_offset); - } - } /* !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) { -- 2.7.4