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]

Re: [PATCH] PowerPC 64-bit addition and division


> cc: gcc-patches@gcc.gnu.org
> Date: Fri, 13 Jul 2001 12:56:17 -0400
> From: David Edelsohn <dje@watson.ibm.com>
> 
> 	I would like to apply the following patch on both the trunk and
> the gcc-3.0 branch.  This patch fixes PR/3464 (GCC generating incorrect
> additions of large constants) and another problem that I uncovered while
> testing this (GCC incorrectly converting divisions by negative numbers
> which appeared positive into shifts: execute/divconst-2.c).
> 
> 	I have tested this on AIX (both 32-bit and 64-bit modes).  Daniel
> Berlin has tested this on powerpc-linux.  No regressions occurred (and
> execute/divconst-2.c now passes in AIX 64-bit mode).
> 
> 	The GCC development trunk currently is broken, so I will wait
> before committing this to the trunk.  Is there any objection to my
> committing this to the gcc-3.0 branch?

I've just unbroken the trunk.  It's much better to commit to the trunk
first, then to the branch, it keeps the branch more stable.

(The patch looks fine, BTW.)

> Thanks, David
> 
> 
> 2001-07-13  David Edelsohn  <edelsohn@gnu.org>
> 
> 	* rs6000.c (reg_or_{add,sub}_cint64_operand): New predicates.
> 	(add_operand): Compare CONST_INT with fewer function calls.
> 	(print_operand, case 'p'): Ensure positive operand.
> 	* rs6000.h (CONST_OK_FOR_LETTER_P, case 'N'): Ensure positive value.
> 	(PREDICATE_CODES): Add new predicates.
> 	* rs6000.md (addsi3): Split 32-bit constants more correctly.
> 	(divsi3, modsi3): Ensure positive power-of-2.
> 	(adddi3): Use new predicate.  Split 32-bit constants more
> 	correctly.  Re-arrange splitter to handle any constant.
> 	(subdi3): Use new predicate.
> 	(divdi3, moddi3): Ensure positive power-of-2.


-- 
- Geoffrey Keating <geoffk@geoffk.org>


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