mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
78d75b3799
commit
b9f3accdcf
4 changed files with 107 additions and 25 deletions
|
|
@ -62,6 +62,8 @@ func main() {
|
|||
p64_plus4k_plus1 := id(float64(p64 + 4096 + 1)) // want this to be precise and fit in 53 bits mantissa
|
||||
n32_minus4k := id(float32(n32 - 4096))
|
||||
n64_minus4k := id(float64(n64 - 4096))
|
||||
n32_plus4k := id(float32(n32 + 4096))
|
||||
n64_plus4k := id(float64(n64 + 4096))
|
||||
inf_32 := id(float32(one / 0))
|
||||
inf_64 := id(float64(one / 0))
|
||||
ninf_32 := id(float32(-one / 0))
|
||||
|
|
@ -79,6 +81,7 @@ func main() {
|
|||
{"p64_plus4k_plus1", p64_plus4k_plus1, p32},
|
||||
{"n32_minus4k", n32_minus4k, n32},
|
||||
{"n64_minus4k", n64_minus4k, n32},
|
||||
{"n32_plus4k", n32_plus4k, n32 + 4096},
|
||||
{"inf_32", inf_32, p32},
|
||||
{"inf_64", inf_64, p32},
|
||||
{"ninf_32", ninf_32, n32},
|
||||
|
|
@ -108,6 +111,8 @@ func main() {
|
|||
{"p64_plus4k_plus1", p64_plus4k_plus1, p64},
|
||||
{"n32_minus4k", n32_minus4k, n32 - 4096},
|
||||
{"n64_minus4k", n64_minus4k, n64},
|
||||
{"n32_plus4k", n32_plus4k, n32 + 4096},
|
||||
{"n64_plus4k", n64_plus4k, n64 + 4096},
|
||||
{"inf_32", inf_32, p64},
|
||||
{"inf_64", inf_64, p64},
|
||||
{"ninf_32", ninf_32, n64},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue