aboutsummaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-05-22 23:06:30 -0400
committerGopher Robot <gobot@golang.org>2024-05-29 17:58:53 +0000
commit2a7ca156b8189c68c0a29b4c66194a42c5ce3c9b (patch)
tree7ac6dc198ebad85420719774562d29b7b59c6684 /src/math
parent5121b45d7426687076c20ae0f4fcae1238f3ed47 (diff)
downloadgo-2a7ca156b8189c68c0a29b4c66194a42c5ce3c9b.tar.xz
all: document legacy //go:linkname for final round of modules
Add linknames for most modules with ≥50 dependents. Add linknames for a few other modules that we know are important but are below 50. Remove linknames from badlinkname.go that do not merit inclusion (very small number of dependents). We can add them back later if the need arises. Fixes #67401. (For now.) Change-Id: I1e49fec0292265256044d64b1841d366c4106002 Reviewed-on: https://go-review.googlesource.com/c/go/+/587756 Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Bypass: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/math')
-rw-r--r--src/math/unsafe.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/math/unsafe.go b/src/math/unsafe.go
index e59f50ca62..e251f62a2a 100644
--- a/src/math/unsafe.go
+++ b/src/math/unsafe.go
@@ -6,6 +6,18 @@ package math
import "unsafe"
+// Despite being an exported symbol,
+// Float32bits is linknamed by widely used packages.
+// Notable members of the hall of shame include:
+// - gitee.com/quant1x/num
+//
+// Do not remove or change the type signature.
+// See go.dev/issue/67401.
+//
+// Note that this comment is not part of the doc comment.
+//
+//go:linkname Float32bits
+
// Float32bits returns the IEEE 754 binary representation of f,
// with the sign bit of f and the result in the same bit position.
// Float32bits(Float32frombits(x)) == x.