]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix arm build
authorRuss Cox <rsc@golang.org>
Fri, 20 Mar 2015 04:59:37 +0000 (00:59 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 20 Mar 2015 05:00:46 +0000 (05:00 +0000)
Make mask uint32, and move down one line to match atomic_arm64.go.

Change-Id: I4867de494bc4076b7c2b3bf4fd74aa984e3ea0c8
Reviewed-on: https://go-review.googlesource.com/7854
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/atomic_arm.go

index 00cc1837fd2bb2f6bde2ea69b39c50f7b8314e63..75206ab94afd4ae9b68de016743cb78236b45a87 100644 (file)
@@ -159,8 +159,8 @@ func atomicand8(addr *uint8, v uint8) {
        // Align down to 4 bytes and use 32-bit CAS.
        uaddr := uintptr(unsafe.Pointer(addr))
        addr32 := (*uint32)(unsafe.Pointer(uaddr &^ 3))
-       mask := 0xFF << ((uaddr & 3) * 8)      // little endian
-       word := uint32(v) << ((uaddr & 3) * 8) // little endian
+       word := uint32(v) << ((uaddr & 3) * 8)    // little endian
+       mask := uint32(0xFF) << ((uaddr & 3) * 8) // little endian
        word |= ^mask
        for {
                old := *addr32