summaryrefslogtreecommitdiff
path: root/src/pkg/math/hypot_amd64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/math/hypot_amd64.s')
-rw-r--r--src/pkg/math/hypot_amd64.s14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pkg/math/hypot_amd64.s b/src/pkg/math/hypot_amd64.s
index 1f691e70e..02fff5b92 100644
--- a/src/pkg/math/hypot_amd64.s
+++ b/src/pkg/math/hypot_amd64.s
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#define PosInf 0x7ff0000000000000
-#define NaN 0x7FF0000000000001
+#define PosInf 0x7FF0000000000000
+#define NaN 0x7FF8000000000001
-// func Hypot(x, y float64) float64
+// func Hypot(p, q float64) float64
TEXT ·Hypot(SB),7,$0
// test bits for special cases
- MOVQ x+0(FP), BX
+ MOVQ p+0(FP), BX
MOVQ $~(1<<63), AX
- ANDQ AX, BX // x = |x|
- MOVQ y+8(FP), CX
- ANDQ AX, CX // y = |y|
+ ANDQ AX, BX // p = |p|
+ MOVQ q+8(FP), CX
+ ANDQ AX, CX // q = |q|
MOVQ $PosInf, AX
CMPQ AX, BX
JLE isInfOrNaN