mirror of
https://github.com/golang/go
synced 2024-11-18 13:04:46 -07:00
math: make sqrt smaller on AMD64
This makes function fit in 16 bytes, saving 16 bytes. Change-Id: Iac5d2add42f6dae985b2a5cbe19ad4bd4bcc92ec Reviewed-on: https://go-review.googlesource.com/29151 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
fedb0b3018
commit
731b3ed18d
@ -6,7 +6,7 @@
|
||||
|
||||
// func Sqrt(x float64) float64
|
||||
TEXT ·Sqrt(SB), NOSPLIT, $0
|
||||
MOVSD x+0(FP), X0
|
||||
SQRTSD X0, X1
|
||||
MOVSD X1, ret+8(FP)
|
||||
XORPS X0, X0 // break dependency
|
||||
SQRTSD x+0(FP), X0
|
||||
MOVSD X0, ret+8(FP)
|
||||
RET
|
||||
|
Loading…
Reference in New Issue
Block a user