Commit graph

8 commits

Author SHA1 Message Date
David Chase
7056c71d32 cmd/compile: disable use of new saturating float-to-int conversions
The new conversions can be activated (or bisected) with
  -gcflags=all=-d=converthash=PATTERN

where PATTERN is either a hash string or n, qn, y, qy for
no, quietly no, yes, quietly yes.

This CL makes the default pattern be "qn" instead of the
default-default which is an efficient encoding of "qy".

Updates #75834

Change-Id: I88a9fd7880bc999132420c8d0a22a8fdc1e95a2a
Reviewed-on: https://go-review.googlesource.com/c/go/+/711845
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Bypass: David Chase <drchase@google.com>
2025-10-14 15:09:35 -07:00
David Chase
6d5b13793f Revert "cmd/compile: make 386 float-to-int conversions match amd64"
This reverts commit 78d75b3799.

Reason for revert: we need to do this more carefully, at minimum gated by a module version

(This should follow the softfloat FP conversion revert)

Change-Id: I736bec6cd860285dcc3b11fac85b377a149435c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/711842
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
2025-10-14 12:46:22 -07:00
David Chase
bb2a14252b Revert "runtime: adjust softfloat corner cases to match amd64/arm64"
This reverts commit b9f3accdcf.

Reason for revert: we need to do this more carefully, at minimum gated by a module version

(This should follow the WASM FP conversion revert)

Change-Id: Ib98ce7d243348f69c9944db8537397b225c2cc33
Reviewed-on: https://go-review.googlesource.com/c/go/+/711841
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Bypass: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
2025-10-14 12:45:58 -07:00
David Chase
3bc9d9fa83 Revert "cmd/compile: make wasm match other platforms for FP->int32/64 conversions"
This reverts commit 8d810286b3.

Reason for revert: we need to do this more carefully, at minimum gated by a module version

Change-Id: Ia951e2e5ecdd455ea0f17567963c6fab0f4540dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/711840
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2025-10-14 12:44:32 -07:00
David Chase
8d810286b3 cmd/compile: make wasm match other platforms for FP->int32/64 conversions
this change is for overflows, so that all the platforms agree.

Change-Id: I9f459353615bf24ef8a5de641063d9ce34986241
Reviewed-on: https://go-review.googlesource.com/c/go/+/708358
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
2025-10-09 08:24:04 -07:00
David Chase
b9f3accdcf runtime: adjust softfloat corner cases to match amd64/arm64
This chooses saturating behavior for over/underflow.

Change-Id: I96a33ef73feacdafe8310f893de445060bc1a536
Reviewed-on: https://go-review.googlesource.com/c/go/+/709595
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
2025-10-09 08:23:39 -07:00
David Chase
78d75b3799 cmd/compile: make 386 float-to-int conversions match amd64
Change-Id: Iff13b4471f94a6a91d8b159603a9338cb9c89747
Reviewed-on: https://go-review.googlesource.com/c/go/+/708295
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-09 08:23:30 -07:00
David Chase
0e466a8d1d cmd/compile: modify float-to-[u]int so that amd64 and arm64 match
Eventual goal is that all the architectures agree, and are
sensible.  The test will be build-tagged to exclude
not-yet-handled platforms.

This change also bisects the conversion change in case of bugs.
(`bisect -compile=convert ...`)

Change-Id: I98528666b0a3fde17cbe8d69b612d01da18dce85
Reviewed-on: https://go-review.googlesource.com/c/go/+/691135
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
2025-10-09 08:23:21 -07:00