svn commit: r279669 - head/sys/cddl/dev/dtrace/arm
Andrew Turner
andrew at FreeBSD.org
Thu Mar 5 18:03:43 UTC 2015
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)
More information about the svn-src-all
mailing list