diff options
| author | Michael Matloob <matloob@golang.org> | 2015-11-02 14:09:24 -0500 |
|---|---|---|
| committer | Michael Matloob <matloob@golang.org> | 2015-11-10 17:38:04 +0000 |
| commit | 67faca7d9c54b367aee5fdeef2d5dd609fcf99d0 (patch) | |
| tree | 5c6e8b4e243286311bbc4743d6a8e86f16dda85f /src/runtime/atomic_ppc64x.s | |
| parent | d33360571f46b46724b908a5603520dce1e8a81c (diff) | |
| download | go-67faca7d9c54b367aee5fdeef2d5dd609fcf99d0.tar.xz | |
runtime: break atomics out into package runtime/internal/atomic
This change breaks out most of the atomics functions in the runtime
into package runtime/internal/atomic. It adds some basic support
in the toolchain for runtime packages, and also modifies linux/arm
atomics to remove the dependency on the runtime's mutex. The mutexes
have been replaced with spinlocks.
all trybots are happy!
In addition to the trybots, I've tested on the darwin/arm64 builder,
on the darwin/arm builder, and on a ppc64le machine.
Change-Id: I6698c8e3cf3834f55ce5824059f44d00dc8e3c2f
Reviewed-on: https://go-review.googlesource.com/14204
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/atomic_ppc64x.s')
| -rw-r--r-- | src/runtime/atomic_ppc64x.s | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/runtime/atomic_ppc64x.s b/src/runtime/atomic_ppc64x.s index 47769e6fd8..7cdb7466eb 100644 --- a/src/runtime/atomic_ppc64x.s +++ b/src/runtime/atomic_ppc64x.s @@ -6,39 +6,6 @@ #include "textflag.h" -// uint32 runtime·atomicload(uint32 volatile* addr) -TEXT ·atomicload(SB),NOSPLIT|NOFRAME,$0-12 - MOVD addr+0(FP), R3 - SYNC - MOVWZ 0(R3), R3 - CMPW R3, R3, CR7 - BC 4, 30, 1(PC) // bne- cr7,0x4 - ISYNC - MOVW R3, ret+8(FP) - RET - -// uint64 runtime·atomicload64(uint64 volatile* addr) -TEXT ·atomicload64(SB),NOSPLIT|NOFRAME,$0-16 - MOVD addr+0(FP), R3 - SYNC - MOVD 0(R3), R3 - CMP R3, R3, CR7 - BC 4, 30, 1(PC) // bne- cr7,0x4 - ISYNC - MOVD R3, ret+8(FP) - RET - -// void *runtime·atomicloadp(void *volatile *addr) -TEXT ·atomicloadp(SB),NOSPLIT|NOFRAME,$0-16 - MOVD addr+0(FP), R3 - SYNC - MOVD 0(R3), R3 - CMP R3, R3, CR7 - BC 4, 30, 1(PC) // bne- cr7,0x4 - ISYNC - MOVD R3, ret+8(FP) - RET - TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0 // LWSYNC is the "export" barrier recommended by Power ISA // v2.07 book II, appendix B.2.2.2. |
