From 745b909395539378b31154a57d159223c37b1e03 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 15 Dec 2000 10:10:30 -0500 Subject: [PATCH] jump.c (jump_optimize_1): Don't delete the line note after the prologue even if it seems redundant. * jump.c (jump_optimize_1): Don't delete the line note after the prologue even if it seems redundant. * config/arm/arm.c (arm_expand_prologue): Set RTX_FRAME_RELATED_P on all insns used to adjust the stack. From-SVN: r38286 --- gcc/ChangeLog | 44 ++++++++++++++++++++++++++------------------ gcc/config/arm/arm.c | 10 +++++++++- gcc/jump.c | 25 ++++++++++++++++--------- 3 files changed, 51 insertions(+), 28 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bf665e470a8..598529a4b76 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2000-12-15 Jason Merrill + + * jump.c (jump_optimize_1): Don't delete the line note after the + prologue even if it seems redundant. + + * config/arm/arm.c (arm_expand_prologue): Set RTX_FRAME_RELATED_P + on all insns used to adjust the stack. + Fri Dec 15 15:32:16 MET 2000 Jan Hubicka * combine.c (cant_combine_insn_p): Get around SUBREGs when determining @@ -207,24 +215,24 @@ Mon Dec 11 13:51:09 2000 Jeffrey A Law (law@cygnus.com) 2000-12-11 Neil Booth - * cpperror.c (print_location): New function. - (print_containing_files): Simplify. - (_cpp_begin_message): Simplify and use print_location. - * cppfiles.c (stack_include_file): Update. - (_cpp_pop_file_buffer): Update. - * cpphash.h (struct cpp_buffer): New members - include_stack_listed and type. - * cpplib.c (_cpp_handle_directive): Buffer->inc is not null. - (run_directive): Take buffer type. cpp_push_buffer cannot fail. - (_cpp_do__Pragma, cpp_define, _cpp_define_builtin, cpp_undef, - handle_assertion): Update. - (cpp_push_buffer): Take a buffer type and file name. - (cpp_pop_buffer): Update. Clear include_stack_listed. - * cpplib.h (input_stack_listing_current): Remove. - (enum cpp_buffer_type): New. - (cpp_push_buffer): New prototype. - * cppmacro.c (builtin_macro): Simplify; buffer cannot be null. - * fix-header.c (read_scan_file): Update. + * cpperror.c (print_location): New function. + (print_containing_files): Simplify. + (_cpp_begin_message): Simplify and use print_location. + * cppfiles.c (stack_include_file): Update. + (_cpp_pop_file_buffer): Update. + * cpphash.h (struct cpp_buffer): New members + include_stack_listed and type. + * cpplib.c (_cpp_handle_directive): Buffer->inc is not null. + (run_directive): Take buffer type. cpp_push_buffer cannot fail. + (_cpp_do__Pragma, cpp_define, _cpp_define_builtin, cpp_undef, + handle_assertion): Update. + (cpp_push_buffer): Take a buffer type and file name. + (cpp_pop_buffer): Update. Clear include_stack_listed. + * cpplib.h (input_stack_listing_current): Remove. + (enum cpp_buffer_type): New. + (cpp_push_buffer): New prototype. + * cppmacro.c (builtin_macro): Simplify; buffer cannot be null. + * fix-header.c (read_scan_file): Update. 2000-12-10 Robert Lipe diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index f5541af8987..ee2757c31b4 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7848,9 +7848,17 @@ arm_expand_prologue () if (amount != const0_rtx) { + /* This add can produce multiple insns for a large constant, so we + need to get tricky. */ + rtx last = get_last_insn (); insn = emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, amount)); - RTX_FRAME_RELATED_P (insn) = 1; + do + { + last = last ? NEXT_INSN (last) : get_insns (); + RTX_FRAME_RELATED_P (last) = 1; + } + while (last != insn); /* If the frame pointer is needed, emit a special barrier that will prevent the scheduler from moving stores to the frame diff --git a/gcc/jump.c b/gcc/jump.c index 6a916fa8cd9..f4845b8e484 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -723,18 +723,25 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, rtx last_note = 0; for (insn = f; insn; insn = NEXT_INSN (insn)) - if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) >= 0) + if (GET_CODE (insn) == NOTE) { - /* Delete this note if it is identical to previous note. */ - if (last_note - && NOTE_SOURCE_FILE (insn) == NOTE_SOURCE_FILE (last_note) - && NOTE_LINE_NUMBER (insn) == NOTE_LINE_NUMBER (last_note)) + if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) + /* Any previous line note was for the prologue; gdb wants a new + note after the prologue even if it is for the same line. */ + last_note = NULL_RTX; + else if (NOTE_LINE_NUMBER (insn) >= 0) { - delete_insn (insn); - continue; - } + /* Delete this note if it is identical to previous note. */ + if (last_note + && NOTE_SOURCE_FILE (insn) == NOTE_SOURCE_FILE (last_note) + && NOTE_LINE_NUMBER (insn) == NOTE_LINE_NUMBER (last_note)) + { + delete_insn (insn); + continue; + } - last_note = insn; + last_note = insn; + } } } -- 2.30.2