]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal: disable OSQRT on GOARM=5
authorJoel Sing <jsing@google.com>
Thu, 30 Apr 2015 18:19:34 +0000 (04:19 +1000)
committerJoel Sing <jsing@google.com>
Tue, 5 May 2015 05:57:09 +0000 (05:57 +0000)
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/9524
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/internal/gc/walk.go

index c32a8137d614706740f13e2590495e21d288ed8a..82cedd687cf3b6be003f35a2ee2aed19795b063e 100644 (file)
@@ -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