aboutsummaryrefslogtreecommitdiff
path: root/src/internal/runtime
diff options
context:
space:
mode:
authorGavin Lam <gavin.oss@tutamail.com>2026-01-15 04:22:13 +0000
committerGopher Robot <gobot@golang.org>2026-01-22 12:48:33 -0800
commite9e05687dee08ba0f0fb07b076f1c3f47bb57f34 (patch)
tree004cb6d4462d87c3ecee4f77758577cbf7c51bff /src/internal/runtime
parent1996c22f0a58a32f5f415e1a6c84bcb305f04c36 (diff)
downloadgo-e9e05687dee08ba0f0fb07b076f1c3f47bb57f34.tar.xz
internal/runtime: remove math.Mul64
internal/runtime/math.Mul64 is a copy of math/bits.Mul64 and redundant. Change-Id: I4dd2ab531a32da97839c6b45cf90df6430811967 GitHub-Last-Rev: 1a73e16049ee346ccfa8f052856e49e10e202d70 GitHub-Pull-Request: golang/go#77187 Reviewed-on: https://go-review.googlesource.com/c/go/+/736500 Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/internal/runtime')
-rw-r--r--src/internal/runtime/math/math.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/internal/runtime/math/math.go b/src/internal/runtime/math/math.go
index 0af5aa3f76..e3b277a505 100644
--- a/src/internal/runtime/math/math.go
+++ b/src/internal/runtime/math/math.go
@@ -25,27 +25,6 @@ func MulUintptr(a, b uintptr) (uintptr, bool) {
return a * b, overflow
}
-// Mul64 returns the 128-bit product of x and y: (hi, lo) = x * y
-// with the product bits' upper half returned in hi and the lower
-// half returned in lo.
-// This is a copy from math/bits.Mul64
-// On supported platforms this is an intrinsic lowered by the compiler.
-func Mul64(x, y uint64) (hi, lo uint64) {
- const mask32 = 1<<32 - 1
- x0 := x & mask32
- x1 := x >> 32
- y0 := y & mask32
- y1 := y >> 32
- w0 := x0 * y0
- t := x1*y0 + w0>>32
- w1 := t & mask32
- w2 := t >> 32
- w1 += x0 * y1
- hi = x1*y1 + w2 + w1>>32
- lo = x * y
- return
-}
-
// Add64 returns the sum with carry of x, y and carry: sum = x + y + carry.
// The carry input must be 0 or 1; otherwise the behavior is undefined.
// The carryOut output is guaranteed to be 0 or 1.