1
0
mirror of https://github.com/golang/go synced 2024-11-17 15:54:39 -07:00

runtime/internal/atomic: enable atomic 64bit types for all functions on linux/loong64

ref. CL 356169

Change-Id: I813750d3fe191afe50d4029024ba97800211f688
Reviewed-on: https://go-review.googlesource.com/c/go/+/414414
Reviewed-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Guoqi Chen 2022-06-27 20:36:27 +08:00 committed by Wayne Zuo
parent 3c17053bba
commit c87e69c2b4
3 changed files with 14 additions and 1 deletions

View File

@ -41,6 +41,9 @@ func Loadp(ptr unsafe.Pointer) unsafe.Pointer
//go:noescape
func LoadAcq(ptr *uint32) uint32
//go:noescape
func LoadAcq64(ptr *uint64) uint64
//go:noescape
func LoadAcquintptr(ptr *uintptr) uintptr
@ -79,5 +82,8 @@ func StorepNoWB(ptr unsafe.Pointer, val unsafe.Pointer)
//go:noescape
func StoreRel(ptr *uint32, val uint32)
//go:noescape
func StoreRel64(ptr *uint64, val uint64)
//go:noescape
func StoreReluintptr(ptr *uintptr, val uintptr)

View File

@ -156,6 +156,9 @@ TEXT ·StorepNoWB(SB), NOSPLIT, $0-16
TEXT ·StoreRel(SB), NOSPLIT, $0-12
JMP ·Store(SB)
TEXT ·StoreRel64(SB), NOSPLIT, $0-16
JMP ·Store64(SB)
TEXT ·StoreReluintptr(SB), NOSPLIT, $0-16
JMP ·Store64(SB)
@ -293,6 +296,10 @@ TEXT ·Loadp(SB),NOSPLIT|NOFRAME,$0-16
TEXT ·LoadAcq(SB),NOSPLIT|NOFRAME,$0-12
JMP atomic·Load(SB)
// uint64 ·LoadAcq64(uint64 volatile* ptr)
TEXT ·LoadAcq64(SB),NOSPLIT|NOFRAME,$0-16
JMP atomic·Load64(SB)
// uintptr ·LoadAcquintptr(uintptr volatile* ptr)
TEXT ·LoadAcquintptr(SB),NOSPLIT|NOFRAME,$0-16
JMP atomic·Load64(SB)

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build amd64 || arm64 || mips64 || mips64le || ppc64 || ppc64le || riscv64 || s390x || wasm
//go:build amd64 || arm64 || loong64 || mips64 || mips64le || ppc64 || ppc64le || riscv64 || s390x || wasm
package atomic