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

2017-10-09 Thread Michael Meissner
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

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

2017-10-09 Thread Segher Boessenkool
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). C

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

2017-10-06 Thread Michael Meissner
On Fri, Oct 06, 2017 at 01:25:33PM -0500, Segher Boessenkool wrote: > Hi! > > On Fri, Oct 06, 2017 at 02:03:43PM -0400, Michael Meissner wrote: > > > Do you really need the mr insns? Can't you express that in the > > > arguments? Perhaps using a union of __int128 with something that > > > is two

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

2017-10-06 Thread Segher Boessenkool
Hi! On Fri, Oct 06, 2017 at 02:03:43PM -0400, Michael Meissner wrote: > > Do you really need the mr insns? Can't you express that in the > > arguments? Perhaps using a union of __int128 with something that > > is two long ints? > > My first attempt resulted in the compiler doing move directs to

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

2017-10-06 Thread Michael Meissner
On Fri, Oct 06, 2017 at 11:45:10AM -0500, Segher Boessenkool wrote: > Hi Mike, > > On Thu, Oct 05, 2017 at 06:14:14PM -0400, Michael Meissner wrote: > > This patch adds support for most of the PowerPC ISA 3.0 Atomic Memory > > Operation > > instructions, listed in section 4.5 of the manual. Curr

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

2017-10-06 Thread Segher Boessenkool
Hi Mike, On Thu, Oct 05, 2017 at 06:14:14PM -0400, Michael Meissner wrote: > This patch adds support for most of the PowerPC ISA 3.0 Atomic Memory > Operation > instructions, listed in section 4.5 of the manual. Currently these functions > are done via extended asm. At some point in the future,