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]
Other format: [Raw text]

your patch breaks ppc-e500


Hi Geoff.

This patch breaks e500:

2003-05-03 Geoffrey Keating <geoffk@apple.com>

	* config/rs6000/rs6000.c (scc_comparison_operator): Make equivalent
	to branch_positive_comparison_operator.
	(ccr_bit): Check that sCOND conditions are actually a positive bit.
	(print_operand): Remove %D substitution.
	(rs6000_emit_sCOND): Generate complement operation to ensure that
	sCOND input is a positive bit.
	* config/rs6000/rs6000.md: Rearrange sCOND templates to be in the
	same order as bCOND, and add the missing ones.  Remove the %D
	substitutions from the scc patterns.

The problem is the abort you added in ccr_bit():

/* When generating a sCOND operation, only positive conditions are
allowed. */
if (scc_p && code != EQ && code != GT && code != LT && code != UNORDERED
&& code != GTU && code != LTU)
abort ();


The e500 generates NE conditions in rs6000_generate_compare(), see the code following:

/* SPE FP compare instructions on the GPRs. Yuck! */

If you don't mind, I'd like to commit the following patch.

Is this ok?

2003-05-05 Aldy Hernandez <aldyh@redhat.com>

	* config/rs6000/rs6000.c (ccr_bit): Do not abort on sCOND check
	if E500 target.

Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.468
diff -c -p -r1.468 rs6000.c
*** rs6000.c	4 May 2003 00:33:49 -0000	1.468
--- rs6000.c	5 May 2003 16:15:09 -0000
*************** ccr_bit (op, scc_p)
*** 7682,7688 ****

/* When generating a sCOND operation, only positive conditions are
allowed. */
! if (scc_p && code != EQ && code != GT && code != LT && code != UNORDERED
&& code != GTU && code != LTU)
abort ();


--- 7682,7689 ----

    /* When generating a sCOND operation, only positive conditions are
       allowed.  */
!   if (scc_p && !TARGET_E500
!       && code != EQ && code != GT && code != LT && code != UNORDERED
        && code != GTU && code != LTU)
      abort ();


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