]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/internal/atomic: correct GOARM=7 guard at a DMB instruction
authorCherry Mui <cherryyz@google.com>
Fri, 16 Feb 2024 15:58:56 +0000 (10:58 -0500)
committerCherry Mui <cherryyz@google.com>
Fri, 16 Feb 2024 18:13:42 +0000 (18:13 +0000)
CL 525637 changed to the guard of DMB instruction from the
compiled-in runtime.goarm value to GOARM_7 macro and CPU feature
detection. It missed a place where runtime.goarm is loaded to a
register and reused later. This CL corrects the condition.

Fixes #65601.

Change-Id: I2ddefd03a1eb1048dbec0254c6e234c65b054279
Reviewed-on: https://go-review.googlesource.com/c/go/+/564855
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/internal/atomic/atomic_arm.s

index 662b5987f2526638b62cea9a105e5ea8d1444215..1cf7d8f6ef3560ed41a39d333594399befe57402 100644 (file)
@@ -41,8 +41,10 @@ casl:
        BNE     casl
        MOVW    $1, R0
 
-       CMP     $7, R8
-       BLT     2(PC)
+#ifndef GOARM_7
+       CMP     $0, R11
+       BEQ     2(PC)
+#endif
        DMB     MB_ISH
 
        MOVB    R0, ret+12(FP)