]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] runtime: rewrite softfloat functions to avoid using floats
authorCherry Mui <cherryyz@google.com>
Thu, 10 Jun 2021 00:01:12 +0000 (20:01 -0400)
committerCherry Mui <cherryyz@google.com>
Mon, 2 Aug 2021 16:09:19 +0000 (16:09 +0000)
commitaa3d54da07bea208cd7c5860875b2d3fbbfeb825
treef2c0aa61946a61a571721cdebaa90e2cc6acc7ec
parent0b8a9ccb25cd9b8f78eb47b1934522af3fb4108f
[dev.typeparams] runtime: rewrite softfloat functions to avoid using floats

Currently, most softfloat functions take uint32/64 arguments (for
bit representation of float32/64) and operate on uint32/64. But
there are exeptions where the function take float arguments and
operate on float. So they are only actually softfloat if the
helper functions themselves are translated (by the compiler's
softfloat mode). These are mostly fine (besides being a bit
convoluted). But with register ABIs this inconsistency adds
complexity to the compiler to generate such calls, because it
needs to be called with the right ABI.

Rewrite the functions to operate on uint32/64 directly, using
other helper functions. So they all take uint32/64 arguments and
return uint32/64.

Change-Id: Id9383b74bcbafee44160cc5b58ab245bffbbdfd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/327273
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/runtime/softfloat64.go