egcs 1.0.2

Bernd Schmidt crux@pool.informatik.rwth-aachen.de
Mon Feb 16 04:49:00 GMT 1998


> Here is the patch I have been talking about. It was installed
> in egcs evev before egcs 1.0.1 was released.
> 
> Fri Dec  5 16:26:03 1997  Bernd Schmidt <crux@ohara.Informatik.RWTH-Aachen.DE>
> 
> 	* i386.c (notice_update_cc): Remove bogus pentium GCC code.

You are twice wrong: the patch below doesn't match the ChangeLog entry, and
the patch that goes with the ChangeLog entry was installed in egcs-1.0.1.

Bernd

> --- ./../../../import/egcs/gcc/config/i386/i386.c	Fri Dec 19 00:47:13 1997
> +++ config/i386/i386.c	Thu Feb 12 10:49:09 1998
> @@ -3397,31 +3397,37 @@
>  	  if (cc_status.value1
>  	      && reg_overlap_mentioned_p (SET_DEST (exp), cc_status.value1))
>  	    cc_status.value1 = 0;
> +
>  	  if (cc_status.value2
>  	      && reg_overlap_mentioned_p (SET_DEST (exp), cc_status.value2))
>  	    cc_status.value2 = 0;
> +
>  	  return;
>  	}
> +
>        /* Moving register into memory doesn't alter the cc's.
>  	 It may invalidate the RTX's which we remember the cc's came from.  */
>        if (GET_CODE (SET_DEST (exp)) == MEM
>  	  && (REG_P (SET_SRC (exp))
>  	      || GET_RTX_CLASS (GET_CODE (SET_SRC (exp))) == '<'))
>  	{
> -	  if (cc_status.value1 && GET_CODE (cc_status.value1) == MEM
> -	      || reg_mentioned_p (SET_DEST (exp), cc_status.value1))
> +	  if (cc_status.value1
> +	      && reg_overlap_mentioned_p (SET_DEST (exp), cc_status.value1))
>  	    cc_status.value1 = 0;
> -	  if (cc_status.value2 && GET_CODE (cc_status.value2) == MEM
> -	      || reg_mentioned_p (SET_DEST (exp), cc_status.value2))
> +	  if (cc_status.value2
> +	      && reg_overlap_mentioned_p (SET_DEST (exp), cc_status.value2))
>  	    cc_status.value2 = 0;
> +
>  	  return;
>  	}
> +
>        /* Function calls clobber the cc's.  */
>        else if (GET_CODE (SET_SRC (exp)) == CALL)
>  	{
>  	  CC_STATUS_INIT;
>  	  return;
>  	}
> +
>        /* Tests and compares set the cc's in predictable ways.  */
>        else if (SET_DEST (exp) == cc0_rtx)
>  	{
> @@ -3429,14 +3435,14 @@
>  	  cc_status.value1 = SET_SRC (exp);
>  	  return;
>  	}
> +
>        /* Certain instructions effect the condition codes. */
>        else if (GET_MODE (SET_SRC (exp)) == SImode
>  	       || GET_MODE (SET_SRC (exp)) == HImode
>  	       || GET_MODE (SET_SRC (exp)) == QImode)
>  	switch (GET_CODE (SET_SRC (exp)))
>  	  {
> -	  case ASHIFTRT: case LSHIFTRT:
> -	  case ASHIFT:
> +	  case ASHIFTRT: case LSHIFTRT: case ASHIFT:
>  	    /* Shifts on the 386 don't set the condition codes if the
>  	       shift count is zero. */
>  	    if (GET_CODE (XEXP (SET_SRC (exp), 1)) != CONST_INT)
> @@ -3444,6 +3450,7 @@
>  		CC_STATUS_INIT;
>  		break;
>  	      }
> +
>  	    /* We assume that the CONST_INT is non-zero (this rtx would
>  	       have been deleted if it were zero. */
>  
> @@ -3468,6 +3475,7 @@
>        if (SET_DEST (XVECEXP (exp, 0, 0)) == pc_rtx)
>  	return;
>        if (SET_DEST (XVECEXP (exp, 0, 0)) == cc0_rtx)
> +
>  	{
>  	  CC_STATUS_INIT;
>            if (stack_regs_mentioned_p (SET_SRC (XVECEXP (exp, 0, 0))))
> @@ -3481,6 +3489,7 @@
>  	    cc_status.value1 = SET_SRC (XVECEXP (exp, 0, 0));
>  	  return;
>  	}
> +
>        CC_STATUS_INIT;
>      }
>    else
> 



More information about the Gcc mailing list