lkml.org 
[lkml]   [2017]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [OpenRISC] [PATCH v3 09/25] openrisc: add optimized atomic operations
From
Date
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~

\
 
 \ /
  Last update: 2017-02-22 18:32    [W:0.415 / U:2.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site