Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1385556

Re: [RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}()

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}()
Date 2016-04-23 04:00 +0200
Message-ID <rqV1v-3fD-3@gated-at.bofh.it> (permalink)
References <rqFSN-8hs-3@gated-at.bofh.it> <rqG2u-8lR-1@gated-at.bofh.it> <rqMAW-542-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Apr 22, 2016 at 09:57:04AM -0700, Richard Henderson wrote:
> On 04/22/2016 02:04 AM, Peter Zijlstra wrote:
> > +	"1:	ldl_l %0,%1\n"						\
> > +	"       mov %0,%2\n"						\
> > +	"	" #asm_op " %0,%3,%0\n"					\
> > +	"	stl_c %0,%1\n"						\
> 
> No need for the extra mov.
> 
> 	ldl_l %2,%1
> 	asm_op %2,%3,%0
> 	stl_c %0,%1

Indeed, I got my head stuck in two operand (x86) asm. This is the second
such 'mistake', I'll go have a look at the rest too.

Thanks!

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}() Peter Zijlstra <peterz@infradead.org> - 2016-04-22 12:00 +0200
  Re: [RFC][PATCH 02/31] locking,alpha: Implement  atomic{,64}_fetch_{add,sub,and,andnot,or,xor}() Richard Henderson <rth@twiddle.net> - 2016-04-22 19:00 +0200
    Re: [RFC][PATCH 02/31] locking,alpha: Implement  atomic{,64}_fetch_{add,sub,and,andnot,or,xor}() Peter Zijlstra <peterz@infradead.org> - 2016-04-23 04:00 +0200

csiph-web