mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Revert "cmd/compile: don't allow NaNs in floating-point constant ops"
This reverts CL 213477. Reason for revert: tests are failing on linux-mips*-rtrk builders. Change-Id: I8168f7450890233f1bd7e53930b73693c26d4dc0 Reviewed-on: https://go-review.googlesource.com/c/go/+/220897 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
58ba0f9dcd
commit
a9f1ea4a83
11 changed files with 26 additions and 200 deletions
|
|
@ -339,12 +339,7 @@ var genericOps = []opData{
|
|||
{name: "Const32", aux: "Int32"}, // auxint is sign-extended 32 bits
|
||||
// Note: ConstX are sign-extended even when the type of the value is unsigned.
|
||||
// For instance, uint8(0xaa) is stored as auxint=0xffffffffffffffaa.
|
||||
{name: "Const64", aux: "Int64"}, // value is auxint
|
||||
// Note: for both Const32F and Const64F, we disallow encoding NaNs.
|
||||
// Signaling NaNs are tricky because if you do anything with them, they become quiet.
|
||||
// Particularly, converting a 32 bit sNaN to 64 bit and back converts it to a qNaN.
|
||||
// See issue 36399 and 36400.
|
||||
// Encodings of +inf, -inf, and -0 are fine.
|
||||
{name: "Const64", aux: "Int64"}, // value is auxint
|
||||
{name: "Const32F", aux: "Float32"}, // value is math.Float64frombits(uint64(auxint)) and is exactly representable as float 32
|
||||
{name: "Const64F", aux: "Float64"}, // value is math.Float64frombits(uint64(auxint))
|
||||
{name: "ConstInterface"}, // nil interface
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue