mirror of
https://github.com/golang/go
synced 2024-11-13 18:40:22 -07:00
install assembly math.Sqrt on amd64
R=r DELTA=33 (32 added, 0 deleted, 1 changed) OCL=34983 CL=34986
This commit is contained in:
parent
285b6021e9
commit
86b119f765
@ -5,7 +5,14 @@
|
||||
include $(GOROOT)/src/Make.$(GOARCH)
|
||||
|
||||
TARG=math
|
||||
GOFILES=\
|
||||
|
||||
OFILES_amd64=\
|
||||
sqrt_amd64.$O\
|
||||
|
||||
OFILES=\
|
||||
$(OFILES_$(GOARCH))
|
||||
|
||||
ALLGOFILES=\
|
||||
asin.go\
|
||||
atan.go\
|
||||
atan2.go\
|
||||
@ -25,4 +32,11 @@ GOFILES=\
|
||||
tan.go\
|
||||
tanh.go\
|
||||
|
||||
NOGOFILES=\
|
||||
$(subst _$(GOARCH).$O,.go,$(OFILES_$(GOARCH)))
|
||||
|
||||
GOFILES=\
|
||||
$(filter-out $(NOGOFILES),$(ALLGOFILES))\
|
||||
$(subst .go,_decl.go,$(NOGOFILES))\
|
||||
|
||||
include $(GOROOT)/src/Make.pkg
|
||||
|
10
src/pkg/math/sqrt_amd64.s
Normal file
10
src/pkg/math/sqrt_amd64.s
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// func Sqrt(x float64) float64
|
||||
TEXT math·Sqrt(SB),7,$0
|
||||
MOVSD x+0(FP), X0
|
||||
SQRTSD X0, X0
|
||||
MOVSD X0, r+8(FP)
|
||||
RET
|
8
src/pkg/math/sqrt_decl.go
Normal file
8
src/pkg/math/sqrt_decl.go
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package math
|
||||
|
||||
func Sqrt(x float64) float64
|
||||
|
Loading…
Reference in New Issue
Block a user