From ee7bb07a53da1c400f4e1130517c362e302be212 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 12 May 2014 10:55:33 -0400 Subject: runtime: add copy of math.sqrt for use by arm softfloat If it's not used (such as on other systems or if softfloat is disabled) the linker will discard it. The alternative is to teach cmd/go that every binary depends on math implicitly on arm. I started down that path but it's too scary. If we're going to get dependencies right we should get dependencies right. Fixes #6994. LGTM=bradfitz, dave R=golang-codereviews, bradfitz, dave CC=golang-codereviews https://golang.org/cl/95290043 --- src/pkg/runtime/softfloat_arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/runtime/softfloat_arm.c') diff --git a/src/pkg/runtime/softfloat_arm.c b/src/pkg/runtime/softfloat_arm.c index f5801dde43..29a52bd0e4 100644 --- a/src/pkg/runtime/softfloat_arm.c +++ b/src/pkg/runtime/softfloat_arm.c @@ -16,7 +16,7 @@ #define FLAGS_V (1U << 28) void runtime·abort(void); -void math·sqrtC(uint64, uint64*); +void runtime·sqrtC(uint64, uint64*); static uint32 trace = 0; @@ -413,7 +413,7 @@ stage3: // regd, regm are 4bit variables break; case 0xeeb10bc0: // D[regd] = sqrt D[regm] - math·sqrtC(getd(regm), &uval); + runtime·sqrtC(getd(regm), &uval); putd(regd, uval); if(trace) -- cgit v1.3