Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Mar 2015 18:03:43 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279669 - head/sys/cddl/dev/dtrace/arm
Message-ID:  <201503051803.t25I3hCE089003@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Thu Mar  5 18:03:42 2015
New Revision: 279669
URL: https://svnweb.freebsd.org/changeset/base/279669

Log:
  dtrace_cas32 and dtrace_casptr should retrn the data loaded from target
  not the new value.
  
  Sponsored by:	ABT Systems Ltd

Modified:
  head/sys/cddl/dev/dtrace/arm/dtrace_asm.S

Modified: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S
==============================================================================
--- head/sys/cddl/dev/dtrace/arm/dtrace_asm.S	Thu Mar  5 17:56:02 2015	(r279668)
+++ head/sys/cddl/dev/dtrace/arm/dtrace_asm.S	Thu Mar  5 18:03:42 2015	(r279669)
@@ -208,12 +208,10 @@ EENTRY(dtrace_casptr)
 1:	ldrex	r3, [r0]	/* Load target */
 	cmp	r3, r1		/* Check if *target == cmp */
 	bne	2f		/* No, return */
-	strex	r3, r2, [r0]	/* Store new to target */
-	cmp	r3, #0		/* Did the store succeed? */
+	strex	ip, r2, [r0]	/* Store new to target */
+	cmp	ip, #0		/* Did the store succeed? */
 	bne	1b		/* No, try again */
-	mov	r0, r2		/* Return the new value of the store */
-2:	movne	r0, r3		/* The first compare failed, return */
-				/* the value loaded from memory */
+2:	mov	r0, r3		/* Return the value loaded from target */
 	RET
 EEND(dtrace_casptr)
 END(dtrace_cas32)



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