Re: [RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}()
From: Peter Zijlstra
Date: Fri Apr 22 2016 - 21:56:36 EST
- Next message: Fengguang Wu: "Re: [RFC][PATCH 00/31] implement atomic_fetch_$op"
- Previous message: Soohoon Lee: "RE: SATA hot unplug question"
- In reply to: Richard Henderson: "Re: [RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}()"
- Next in thread: Peter Zijlstra: "[RFC][PATCH 14/31] locking,metag: Implement atomic_fetch_{add,sub,and,or,xor}()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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!
- Next message: Fengguang Wu: "Re: [RFC][PATCH 00/31] implement atomic_fetch_$op"
- Previous message: Soohoon Lee: "RE: SATA hot unplug question"
- In reply to: Richard Henderson: "Re: [RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}()"
- Next in thread: Peter Zijlstra: "[RFC][PATCH 14/31] locking,metag: Implement atomic_fetch_{add,sub,and,or,xor}()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]