aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/hash64.go4
-rw-r--r--src/runtime/rand.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/hash64.go b/src/runtime/hash64.go
index ac26e660c6..d29ceab7eb 100644
--- a/src/runtime/hash64.go
+++ b/src/runtime/hash64.go
@@ -10,7 +10,7 @@
package runtime
import (
- "internal/runtime/math"
+ "math/bits"
"unsafe"
)
@@ -75,7 +75,7 @@ func memhash64Fallback(p unsafe.Pointer, seed uintptr) uintptr {
}
func mix(a, b uintptr) uintptr {
- hi, lo := math.Mul64(uint64(a), uint64(b))
+ hi, lo := bits.Mul64(uint64(a), uint64(b))
return uintptr(hi ^ lo)
}
diff --git a/src/runtime/rand.go b/src/runtime/rand.go
index 1739e9f8f5..a30845b585 100644
--- a/src/runtime/rand.go
+++ b/src/runtime/rand.go
@@ -10,7 +10,7 @@ import (
"internal/byteorder"
"internal/chacha8rand"
"internal/goarch"
- "internal/runtime/math"
+ "math/bits"
"unsafe"
_ "unsafe" // for go:linkname
)
@@ -227,13 +227,13 @@ func randn(n uint32) uint32 {
func cheaprand() uint32 {
mp := getg().m
// Implement wyrand: https://github.com/wangyi-fudan/wyhash
- // Only the platform that math.Mul64 can be lowered
+ // Only the platform that bits.Mul64 can be lowered
// by the compiler should be in this list.
if goarch.IsAmd64|goarch.IsArm64|goarch.IsPpc64|
goarch.IsPpc64le|goarch.IsMips64|goarch.IsMips64le|
goarch.IsS390x|goarch.IsRiscv64|goarch.IsLoong64 == 1 {
mp.cheaprand += 0xa0761d6478bd642f
- hi, lo := math.Mul64(mp.cheaprand, mp.cheaprand^0xe7037ed1a0b428db)
+ hi, lo := bits.Mul64(mp.cheaprand, mp.cheaprand^0xe7037ed1a0b428db)
return uint32(hi ^ lo)
}