Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jan 2017 17:46:04 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r312932 - head/sys/arm/include
Message-ID:  <201701281746.v0SHk4k2098251@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cognet
Date: Sat Jan 28 17:46:04 2017
New Revision: 312932
URL: https://svnweb.freebsd.org/changeset/base/312932

Log:
  Use strexeq instead of needlessly branch.
  
  Suggested by:	ian

Modified:
  head/sys/arm/include/atomic-v6.h

Modified: head/sys/arm/include/atomic-v6.h
==============================================================================
--- head/sys/arm/include/atomic-v6.h	Sat Jan 28 17:40:37 2017	(r312931)
+++ head/sys/arm/include/atomic-v6.h	Sat Jan 28 17:46:04 2017	(r312932)
@@ -201,9 +201,8 @@ atomic_fcmpset_32(volatile uint32_t *p, 
 	    "1: mov 	%0, #1		\n"
 	    "   ldrex	%1, [%2]	\n"
 	    "   cmp	%1, %3		\n"
-	    "   it	ne		\n"
-	    "   bne	2f		\n"
-	    "   strex	%0, %4, [%2]	\n"
+	    "   it	eq		\n"
+	    "   strexeq	%0, %4, [%2]	\n"
 	    "2:"
 	    : "=&r" (ret), "=&r" (tmp), "+r" (p), "+r" (_cmpval), "+r" (newval)
 	    : : "cc", "memory");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701281746.v0SHk4k2098251>