Commit 731b3ed1 authored by Ilya Tocar's avatar Ilya Tocar

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: 's avatarKeith Randall <khr@golang.org>
parent fedb0b30
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment