]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: disable use of new saturating float-to-int conversions
authorDavid Chase <drchase@google.com>
Tue, 14 Oct 2025 20:18:49 +0000 (16:18 -0400)
committerDavid Chase <drchase@google.com>
Tue, 14 Oct 2025 22:09:35 +0000 (15:09 -0700)
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>

src/cmd/compile/internal/base/flag.go
test/codegen/math.go
test/convert5.go

index 1ac2cecc61ec7ec6b3b5e3bc9a7737d458e5ed16..1d211e0a2dd9f455559ea2d621c912bb29313110 100644 (file)
@@ -264,6 +264,9 @@ func ParseFlags() {
 
        if Debug.Converthash != "" {
                ConvertHash = NewHashDebug("converthash", Debug.Converthash, nil)
+       } else {
+               // quietly disable the convert hash changes
+               ConvertHash = NewHashDebug("converthash", "qn", nil)
        }
        if Debug.Fmahash != "" {
                FmaHash = NewHashDebug("fmahash", Debug.Fmahash, nil)
index 5787657d2bc3df303e5a1b6bd26d0a97e890279a..9ef881a9afc2f57866784f0639e96acc45c597f2 100644 (file)
@@ -1,4 +1,4 @@
-// asmcheck
+// asmcheck -gcflags=-d=converthash=qy
 
 // Copyright 2018 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index 1bd74abdad071543722a6385df6db6830a6f8d5b..df247ca0b9b23868acbc3b29831fa098f4936c8d 100644 (file)
@@ -1,4 +1,4 @@
-// run
+// run -gcflags=-d=converthash=qy
 
 // Copyright 2020 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style