SOURCES: gcc-x87-mmx-eh.patch - updated.

pluto pluto at pld-linux.org
Fri Aug 19 15:35:30 CEST 2005


Author: pluto                        Date: Fri Aug 19 13:35:30 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated.

---- Files affected:
SOURCES:
   gcc-x87-mmx-eh.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/gcc-x87-mmx-eh.patch
diff -u SOURCES/gcc-x87-mmx-eh.patch:1.1 SOURCES/gcc-x87-mmx-eh.patch:1.2
--- SOURCES/gcc-x87-mmx-eh.patch:1.1	Fri Aug 19 01:04:17 2005
+++ SOURCES/gcc-x87-mmx-eh.patch	Fri Aug 19 15:35:25 2005
@@ -1,22 +1,45 @@
-The problem is in exception handler return expander (expand_eh_return in
-except.c) that clears EH_RETURN_STACKADJ_RTX. Optimizer passes then push this
-dangling insn around and sometimes it gets pushed into exit block, where it
-confuses create_pre_exit (). Later, this instruction is cleared anyway, as it is
-in fact not used anywhere. This looks like a generic bug to me.
+2005-08-19  Uros Bizjak  <uros at kss-loka.si>
 
-Thanks in advance,
-Uros.
-
---- gcc-4.1-20050818T1605UTC/gcc/except.c.orig	2005-08-18 16:00:40.000000000 +0000
-+++ gcc-4.1-20050818T1605UTC/gcc/except.c	2005-08-18 16:28:54.000000000 +0000
-@@ -2864,10 +2864,6 @@
- 
-   current_function_calls_eh_return = 1;
- 
--#ifdef EH_RETURN_STACKADJ_RTX
--  emit_move_insn (EH_RETURN_STACKADJ_RTX, const0_rtx);
--#endif
--
-   around_label = gen_label_rtx ();
-   emit_jump (around_label);
+	* mode-switching.c (create_pre_exit): Skip assignments to
+	EH_RETURN_STACKADJ_RTX when searching for return_copy insn.
+	Add comment regarding use insn and simplify check for insns,
+	generated by builtin_apply_return.
+	
+--- gcc/gcc/mode-switching.c	2005-07-05 18:20:07.000000000 +0200
++++ gcc/gcc/mode-switching.c	2005-08-19 10:28:41.000000000 +0200
+@@ -250,6 +250,8 @@ create_pre_exit (int n_entities, int *en
  
+ 		if (INSN_P (return_copy))
+ 		  {
++		    /* Skip USE patterns inserted by
++		       builtin_apply_return.  */
+ 		    if (GET_CODE (PATTERN (return_copy)) == USE
+ 			&& GET_CODE (XEXP (PATTERN (return_copy), 0)) == REG
+ 			&& (FUNCTION_VALUE_REGNO_P
+@@ -270,6 +272,15 @@ create_pre_exit (int n_entities, int *en
+ 			  break;
+ 		      }
+ 		    copy_reg = SET_DEST (return_copy_pat);
++
++#ifdef EH_RETURN_STACKADJ_RTX
++		    /* Skip assignments to EH_RETURN_STACKADJ_RTX.  */
++		    if (rtx_equal_p (copy_reg, EH_RETURN_STACKADJ_RTX))
++		      {
++			last_insn = return_copy;
++			continue;
++		      }
++#endif
+ 		    if (GET_CODE (copy_reg) == REG)
+ 		      copy_start = REGNO (copy_reg);
+ 		    else if (GET_CODE (copy_reg) == SUBREG
+@@ -311,8 +322,8 @@ create_pre_exit (int n_entities, int *en
+ 		    if (copy_start >= ret_start
+ 			&& copy_start + copy_num <= ret_end)
+ 		      nregs -= copy_num;
+-		    else if (!maybe_builtin_apply
+-			     || !FUNCTION_VALUE_REGNO_P (copy_start))
++		    else if (!(maybe_builtin_apply
++			       && FUNCTION_VALUE_REGNO_P (copy_start)))
+ 		      break;
+ 		    last_insn = return_copy;
+ 		  }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/gcc-x87-mmx-eh.patch?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list