diff options
author | Cherry Zhang <cherryyz@google.com> | 2016-08-30 09:12:22 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2016-09-12 19:26:31 +0000 |
commit | 8ff4260777aabe4ec7a92cba8c7dcce24f7fbf2b (patch) | |
tree | 1c0b876cebdde10084006921e6ae222f1245a76b /test/intrinsic.dir | |
parent | cfea26026bc49be1710ed742465514e84bd31ab5 (diff) | |
download | go-8ff4260777aabe4ec7a92cba8c7dcce24f7fbf2b.tar.gz go-8ff4260777aabe4ec7a92cba8c7dcce24f7fbf2b.zip |
cmd/compile: intrinsify Ctz, Bswap on ARM
Atomic ops on ARM are implemented with kernel calls, so they are
not intrinsified.
Change-Id: I0e7cc2e5526ae1a3d24b4b89be1bd13db071f8ef
Reviewed-on: https://go-review.googlesource.com/28977
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'test/intrinsic.dir')
-rw-r--r-- | test/intrinsic.dir/atomic.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test/intrinsic.dir/atomic.go b/test/intrinsic.dir/atomic.go deleted file mode 100644 index 71468a1b38..0000000000 --- a/test/intrinsic.dir/atomic.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build amd64 - -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package main - -import "sync/atomic" - -var x uint32 - -func atomics() { - _ = atomic.LoadUint32(&x) // ERROR "intrinsic substitution for LoadUint32" - atomic.StoreUint32(&x, 1) // ERROR "intrinsic substitution for StoreUint32" - atomic.AddUint32(&x, 1) // ERROR "intrinsic substitution for AddUint32" - atomic.SwapUint32(&x, 1) // ERROR "intrinsic substitution for SwapUint32" - atomic.CompareAndSwapUint32(&x, 1, 2) // ERROR "intrinsic substitution for CompareAndSwapUint32" -} |