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]

ppc-e500: typos


More misc changes.

First, V1DI modes don't have any easily synthesizable vector constants. Second, a small typo in the vector constant range checking. Last, the evsubifw builtin should check for it's second argument to be a 5-bit unsigned number.

Committed to mainline and e500 branch.

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

	* config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
	evsubifw to builtins accepting 5-bit unsigned constants.
	(easy_vector_constant): Return if V1DImode.  Fix typo.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.468
diff -c -p -r1.468 rs6000.c
*** config/rs6000/rs6000.c	4 May 2003 00:33:49 -0000	1.468
--- config/rs6000/rs6000.c	5 May 2003 17:37:34 -0000
*************** easy_vector_constant (op, mode)
*** 1510,1515 ****
--- 1510,1518 ----
    if (GET_MODE_CLASS (mode) != MODE_VECTOR_INT)
      return 0;

+   if (TARGET_SPE && mode == V1DImode)
+     return 0;
+
    cst  = INTVAL (CONST_VECTOR_ELT (op, 0));
    cst2 = INTVAL (CONST_VECTOR_ELT (op, 1));

*************** easy_vector_constant (op, mode)
*** 1524,1530 ****
       have the e500 timing specs.  */
    if (TARGET_SPE && mode == V2SImode
        && cst  >= -0x7fff && cst <= 0x7fff
!       && cst2 >= -0x7fff && cst <= 0x7fff)
      return 1;

    if (TARGET_ALTIVEC && EASY_VECTOR_15 (cst, op, mode))
--- 1527,1533 ----
       have the e500 timing specs.  */
    if (TARGET_SPE && mode == V2SImode
        && cst  >= -0x7fff && cst <= 0x7fff
!       && cst2 >= -0x7fff && cst2 <= 0x7fff)
      return 1;

    if (TARGET_ALTIVEC && EASY_VECTOR_15 (cst, op, mode))
*************** rs6000_expand_binop_builtin (icode, argl
*** 4721,4726 ****
--- 4724,4730 ----
        || icode == CODE_FOR_spe_evrlwi
        || icode == CODE_FOR_spe_evslwi
        || icode == CODE_FOR_spe_evsrwis
+       || icode == CODE_FOR_spe_evsubifw
        || icode == CODE_FOR_spe_evsrwiu)
      {
        /* Only allow 5-bit unsigned literals.  */


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