diff --git a/src/runtime/internal/atomic/atomic_loong64.go b/src/runtime/internal/atomic/atomic_loong64.go index 908a7d69aa..d82a5b8e2a 100644 --- a/src/runtime/internal/atomic/atomic_loong64.go +++ b/src/runtime/internal/atomic/atomic_loong64.go @@ -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) diff --git a/src/runtime/internal/atomic/atomic_loong64.s b/src/runtime/internal/atomic/atomic_loong64.s index bfb6c7e130..3d802beaa7 100644 --- a/src/runtime/internal/atomic/atomic_loong64.s +++ b/src/runtime/internal/atomic/atomic_loong64.s @@ -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) diff --git a/src/runtime/internal/atomic/types_64bit.go b/src/runtime/internal/atomic/types_64bit.go index fda2de9cc4..006e83ba87 100644 --- a/src/runtime/internal/atomic/types_64bit.go +++ b/src/runtime/internal/atomic/types_64bit.go @@ -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