The local variable may not be 64bit aligned, which caused arm tests
to fail.
Fixes #67077
Change-Id: Ia3ae4abcc90319cb10cd593bdc7994cc6eeb3a28
Reviewed-on: https://go-review.googlesource.com/c/go/+/581916
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
func TestAnd64(t *testing.T) {
// Basic sanity check.
x := uint64(0xffffffffffffffff)
+ sink = &x
for i := uint64(0); i < 64; i++ {
old := x
v := atomic.And64(&x, ^(1 << i))
func TestOr64(t *testing.T) {
// Basic sanity check.
x := uint64(0)
+ sink = &x
for i := uint64(0); i < 64; i++ {
old := x
v := atomic.Or64(&x, 1<<i)