lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Feb 2017 07:42:42 +0900
From:   Stafford Horne <shorne@...il.com>
To:     Richard Henderson <rth@...ddle.net>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        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 Thu, Feb 23, 2017 at 04:31:34AM +1100, Richard Henderson wrote:
> 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.

Thanks, Thats right, also here the 2: label being after the l.nop can be
applied.   I should have thought about it.  I made the change, Ill also
fix/look again in the other places.

-Stafford

> 
> r~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ