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]

Re: [PATCH], Add PowerPC ISA 3.0 Atomic Memory Operation functions


On Mon, Oct 09, 2017 at 11:03:10AM -0500, Segher Boessenkool wrote:
> On Fri, Oct 06, 2017 at 02:30:16PM -0400, Michael Meissner wrote:
> > Here is the revised amo.h.  I tested the two test files amo1.c and amo2.c, and
> > they both compile.  It is interesting, use %P0 results in fewer addi's than the
> > older one (there were redunant addi's in passing the address).  Can I check it
> > in?
> > 
> > [gcc]
> > 2017-10-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
> > 
> > 	* config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
> > 	memory operation instruction support.
> > 	* config.gcc (powerpc*-*-*): Include amo.h as an extra header.
> > 	(rs6000-ibm-aix[789]*): Likewise.
> > 	* doc/extend.texi (PowerPC Atomic Memory Operation Functions):
> > 	Document new functions.
> > 
> > [gcc/testsuite]
> > 2017-10-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
> > 
> > 	* gcc.target/powerpc/amo1.c: New test.
> > 	* gcc.target/powerpc/amo2.c: Likewise.
> 
> > --- gcc/testsuite/gcc.target/powerpc/amo1.c	(revision 0)
> > +++ gcc/testsuite/gcc.target/powerpc/amo1.c	(revision 0)
> > @@ -0,0 +1,253 @@
> > +/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
> > +/* { dg-require-effective-target powerpc_p9vector_ok } */
> > +/* { dg-options "-mpower9-vector -mpower9-misc -O2" } */
> 
> Should this be powerpc*-*-* instead?

It needs 64-bit because it requries a __int128_t temporary to get two adjacent
GPR registers.  I'll change it to powerpc*-*-* && lp64.

> Okay for trunk with that taken care of.  Thanks!

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797


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