aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-03-20 00:59:37 -0400
committerRuss Cox <rsc@golang.org>2015-03-20 05:00:46 +0000
commit4d2b3a0b5fc4f17c7806f7e66df0ea272d31cd6d (patch)
treec44a0051a32b9eae650f13c1ff7d0347c66f53fb /src
parentb9602632448099ce0ab16e53d5d2528030e94467 (diff)
downloadgo-4d2b3a0b5fc4f17c7806f7e66df0ea272d31cd6d.tar.xz
runtime: fix arm build
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>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/atomic_arm.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/atomic_arm.go b/src/runtime/atomic_arm.go
index 00cc1837fd..75206ab94a 100644
--- a/src/runtime/atomic_arm.go
+++ b/src/runtime/atomic_arm.go
@@ -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