diff options
author | Russ Cox <rsc@golang.org> | 2014-12-05 19:13:20 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-12-05 19:13:20 -0500 |
commit | 09d92b6bbf26f195a1fe136513238d227bc73f82 (patch) | |
tree | 1c053dbb28cfcaf4cae911f24f096b581c384d4b /src/runtime/atomic_ppc64x.s | |
parent | dcb2ec3b654eb42d8e6bb6e66801ddf2f7f21c7a (diff) | |
download | go-09d92b6bbf26f195a1fe136513238d227bc73f82.tar.gz go-09d92b6bbf26f195a1fe136513238d227bc73f82.zip |
all: power64 is now ppc64
Fixes #8654.
LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/180600043
Diffstat (limited to 'src/runtime/atomic_ppc64x.s')
-rw-r--r-- | src/runtime/atomic_ppc64x.s | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/runtime/atomic_ppc64x.s b/src/runtime/atomic_ppc64x.s new file mode 100644 index 0000000000..7ee08213d4 --- /dev/null +++ b/src/runtime/atomic_ppc64x.s @@ -0,0 +1,40 @@ +// Copyright 2014 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. + +// +build ppc64 ppc64le + +#include "textflag.h" + +// uint32 runtime·atomicload(uint32 volatile* addr) +TEXT ·atomicload(SB),NOSPLIT,$-8-12 + MOVD 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) + RETURN + +// uint64 runtime·atomicload64(uint64 volatile* addr) +TEXT ·atomicload64(SB),NOSPLIT,$-8-16 + MOVD 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) + RETURN + +// void *runtime·atomicloadp(void *volatile *addr) +TEXT ·atomicloadp(SB),NOSPLIT,$-8-16 + MOVD 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) + RETURN |