From 3120adc21294829c230005a89e9bb0ad63de606b Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Fri, 1 May 2015 04:19:34 +1000 Subject: [PATCH] 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/9524 Reviewed-by: Brad Fitzpatrick Reviewed-by: Dave Cheney --- src/cmd/internal/gc/walk.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cmd/internal/gc/walk.go b/src/cmd/internal/gc/walk.go index c32a8137d6..82cedd687c 100644 --- a/src/cmd/internal/gc/walk.go +++ b/src/cmd/internal/gc/walk.go @@ -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 -- 2.48.1