[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c775b4d1-fa98-c1b2-d212-1441343b62d4@twiddle.net>
Date: Thu, 23 Feb 2017 04:31:34 +1100
From: Richard Henderson <rth@...ddle.net>
To: Stafford Horne <shorne@...il.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Jonas Bonn <jonas@...thpole.se>, openrisc@...ts.librecores.org,
linux-kernel@...r.kernel.org, linux@...ck-us.net
Subject: Re: [OpenRISC] [PATCH v3 09/25] openrisc: add optimized atomic
operations
On 02/23/2017 01:22 AM, Stafford Horne wrote:
>> static inline int __atomic_add_unless(atomic_t *v, int a, int u)
>> {
>> int old, tmp;
>>
>> __asm__ __volatile__(
>> "1: l.lwa %0, 0(%2) \n"
>> " l.sfeq %0, %4 \n"
>> " l.bf 2f \n"
>> " l.nop \n"
>> " l.add %1, %0, %3 \n"
You can move this add into the delay slot and drop the preceding nop.
r~
Powered by blists - more mailing lists