Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/internal/atomic: deduplicate And/Or code on wasm #64300

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/runtime/internal/atomic/atomic_andor_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 arm || s390x || loong64 || mips || mipsle || mips64 || mips64le
//go:build arm || s390x || loong64 || mips || mipsle || mips64 || mips64le || wasm

package atomic

Expand Down
48 changes: 0 additions & 48 deletions src/runtime/internal/atomic/atomic_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,51 +339,3 @@ func Xaddint64(ptr *int64, delta int64) int64 {
*ptr = new
return new
}

//go:nosplit
//go:noinline
func And32(ptr *uint32, val uint32) uint32 {
old := *ptr
*ptr = old & val
return old
}

//go:nosplit
//go:noinline
func And64(ptr *uint64, val uint64) uint64 {
old := *ptr
*ptr = old & val
return old
}

//go:nosplit
//go:noinline
func Anduintptr(ptr *uintptr, val uintptr) uintptr {
old := *ptr
*ptr = old & val
return old
}

//go:nosplit
//go:noinline
func Or32(ptr *uint32, val uint32) uint32 {
old := *ptr
*ptr = old | val
return old
}

//go:nosplit
//go:noinline
func Or64(ptr *uint64, val uint64) uint64 {
old := *ptr
*ptr = old | val
return old
}

//go:nosplit
//go:noinline
func Oruintptr(ptr *uintptr, val uintptr) uintptr {
old := *ptr
*ptr = old | val
return old
}