This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch applied to expmed.c


I've committed the following patch, which was reviewed by Richard Henderson.

In this function, we have several strategies to emit code, and if the
first attempt fails, all insns emitted so far are deleted.  The problem is
that one of them may have been a queued increment or a stack adjust.  The
former case was already taken care of, this patch adds code to handle the
latter.

Bernd

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.5316
diff -c -p -r1.5316 ChangeLog
*** ChangeLog	2000/01/01 00:07:53	1.5316
--- ChangeLog	2000/01/01 12:08:29
***************
*** 1,3 ****
--- 1,8 ----
+ 2000-01-01  Bernd Schmidt  <bernds@cygnus.co.uk>
+ 
+ 	* expmed.c (emit_store_flag): Prevent losing a pending stack
+ 	adjust the same way we prevent losing queued increments.
+ 
  Fri Dec 31 19:10:31 1999  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
  
  	* function.c (update_temp_slot_address): Handle case where sum of
Index: expmed.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expmed.c,v
retrieving revision 1.41
diff -c -p -r1.41 expmed.c
*** expmed.c	1999/10/26 06:48:38	1.41
--- expmed.c	2000/01/01 12:08:33
*************** emit_store_flag (target, code, op0, op1,
*** 4229,4237 ****
  	 comparison and then the scc insn.
  
  	 compare_from_rtx may call emit_queue, which would be deleted below
! 	 if the scc insn fails.  So call it ourselves before setting LAST.  */
  
        emit_queue ();
        last = get_last_insn ();
  
        comparison
--- 4229,4239 ----
  	 comparison and then the scc insn.
  
  	 compare_from_rtx may call emit_queue, which would be deleted below
! 	 if the scc insn fails.  So call it ourselves before setting LAST.
! 	 Likewise for do_pending_stack_adjust.  */
  
        emit_queue ();
+       do_pending_stack_adjust ();
        last = get_last_insn ();
  
        comparison


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]