Re: [PosibleSpam] Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Gabriel Paubert
On Thu, Jan 16, 2020 at 07:57:29AM -0600, Segher Boessenkool wrote: > On Thu, Jan 16, 2020 at 09:06:08AM +0100, Gabriel Paubert wrote: > > On Thu, Jan 16, 2020 at 07:11:36AM +0100, Christophe Leroy wrote: > > > Hi Segher, > > > > > > I'm trying to see if we could enhance TCP checksum calculations

RE: z constraint in powerpc inline assembly ?

2020-01-16 Thread David Laight
> You mean the mpc8xx , but I'm also using the mpc832x which has a e300c2 > core and is capable of executing 2 insns in parallel if not in the same > Unit. That should let you do a memory read and an add. (I can't remember if the ppc has 'add from memory' but that is likely to use both units anywa

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Christophe Leroy
Le 16/01/2020 à 17:21, Segher Boessenkool a écrit : Christophe uses a very primitive 32-bit cpu, not even superscalar. A loop doing adde is pretty much optimal, probably wants some unrolling though. You mean the mpc8xx , but I'm also using the mpc832x which has a e300c2 core and is capable

RE: z constraint in powerpc inline assembly ?

2020-01-16 Thread David Laight
From: Segher Boessenkool > Sent: 16 January 2020 16:22 ... > > However a loop of 'add with carry' instructions may not be the > > fastest code by any means. > > Because the carry flag is needed for every 'adc' you can't do more > > that one adc per clock. > > This limits you to 8 bytes/clock on a 6

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Segher Boessenkool
Hi! On Thu, Jan 16, 2020 at 03:54:58PM +, David Laight wrote: > if you are trying to 'loop carry' the 'carry flag' with 'add with carry' > instructions you'll almost certainly need to write the loop in asm. > Since the loop itself is simple, this probably doesn't matter. Agreed. > However a

RE: z constraint in powerpc inline assembly ?

2020-01-16 Thread David Laight
From: Christophe Leroy > Sent: 16 January 2020 06:12 > > I'm trying to see if we could enhance TCP checksum calculations by > splitting inline assembly blocks to give GCC the opportunity to mix it > with other stuff, but I'm getting difficulties with the carry. if you are trying to 'loop carry' t

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Segher Boessenkool
Hi! On Thu, Jan 16, 2020 at 07:11:36AM +0100, Christophe Leroy wrote: > I'm trying to see if we could enhance TCP checksum calculations by > splitting inline assembly blocks to give GCC the opportunity to mix it > with other stuff, but I'm getting difficulties with the carry. > > As far as I ca

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Segher Boessenkool
On Thu, Jan 16, 2020 at 09:06:08AM +0100, Gabriel Paubert wrote: > On Thu, Jan 16, 2020 at 07:11:36AM +0100, Christophe Leroy wrote: > > Hi Segher, > > > > I'm trying to see if we could enhance TCP checksum calculations by splitting > > inline assembly blocks to give GCC the opportunity to mix it

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Gabriel Paubert
On Thu, Jan 16, 2020 at 07:11:36AM +0100, Christophe Leroy wrote: > Hi Segher, > > I'm trying to see if we could enhance TCP checksum calculations by splitting > inline assembly blocks to give GCC the opportunity to mix it with other > stuff, but I'm getting difficulties with the carry. > > As fa