Commit 3120adc2 authored by Joel Sing's avatar Joel Sing

cmd/internal: disable OSQRT on GOARM=5

OSQRT currently produces incorrect results when used on arm with softfloat.
Disable it on GOARM=5 until the actual problem is found and fixed.

Updates #10641

Change-Id: Ia6f6879fbbb05cb24399c2feee93c1be21113e73
Reviewed-on: https://go-review.googlesource.com/9524Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarDave Cheney <dave@cheney.net>
parent 1eebb91a
......@@ -627,6 +627,11 @@ func walkexpr(np **Node, init **NodeList) {
if n.Left.Op == ONAME && n.Left.Sym.Name == "Sqrt" && n.Left.Sym.Pkg.Path == "math" {
switch Thearch.Thechar {
case '5', '6', '7':
// TODO(jsing): This currently breaks math.Sqrt
// on GOARM=5 (see issue 10641).
if Thearch.Thechar == '5' && obj.Getgoarm() == "5" {
break
}
n.Op = OSQRT
n.Left = n.List.N
n.List = nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment