[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160423015534.GW3430@twins.programming.kicks-ass.net>
Date: Sat, 23 Apr 2016 03:55:34 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Richard Henderson <rth@...ddle.net>
Cc: torvalds@...ux-foundation.org, mingo@...nel.org,
tglx@...utronix.de, will.deacon@....com,
paulmck@...ux.vnet.ibm.com, boqun.feng@...il.com,
waiman.long@....com, fweisbec@...il.com,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
vgupta@...opsys.com, linux@....linux.org.uk, egtvedt@...fundet.no,
realmz6@...il.com, ysato@...rs.sourceforge.jp, rkuo@...eaurora.org,
tony.luck@...el.com, geert@...ux-m68k.org, james.hogan@...tec.com,
ralf@...ux-mips.org, dhowells@...hat.com, jejb@...isc-linux.org,
mpe@...erman.id.au, schwidefsky@...ibm.com, dalias@...c.org,
davem@...emloft.net, cmetcalf@...lanox.com, jcmvbkbc@...il.com,
arnd@...db.de, dbueso@...e.de, fengguang.wu@...el.com
Subject: Re: [RFC][PATCH 02/31] locking,alpha: Implement
atomic{,64}_fetch_{add,sub,and,andnot,or,xor}()
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!
Powered by blists - more mailing lists