Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1d646a5

Browse files
ianlancetaylorhowjmay
authored andcommitted
doc/go1.19: Linux race detector now requires glibc 2.17
Fixes #53522 Change-Id: Ibed838d358a733d26a6c3d89446d7fadb1012961 Reviewed-on: https://go-review.googlesource.com/c/go/+/413876 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
1 parent de5329f commit 1d646a5

File tree

3 files changed

+59
-2
lines changed

3 files changed

+59
-2
lines changed

‎src/math/hypot_arm64.s

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Copyright 2021 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
#include "textflag.h"
6+
7+
#define PosInf 0x7FF0000000000000
8+
#define NaN 0x7FF8000000000001
9+
10+
// func archHypot(p, q float64) float64
11+
TEXT ·archHypot(SB), NOSPLIT, 0ドル-24
12+
FMOVD p+0(FP), F0
13+
FMOVD q+8(FP), F1
14+
MOVD $PosInf, R0
15+
FMOVD R0, F30 // F30 is PosInf
16+
17+
FABSD F0, F0
18+
FABSD F1, F1
19+
FCMPD F30, F0
20+
BGE isInf
21+
FCMPD F30, F1
22+
BGE isInf
23+
24+
FCMPED F0, F0
25+
BNE isNaN
26+
FCMPED F1, F1
27+
BNE isNaN
28+
29+
FMAXD F0, F1, F2 // p is greater
30+
FMIND F0, F1, F3 // q is less
31+
FCMPD F2, 0.0
32+
BEQ IsZero // if p == 0, return 0
33+
34+
// p q
35+
FDIVD F2, F3, F3
36+
FMULD F3, F3, F3
37+
FMOVD 1ドル.0, F4
38+
FADDD F4, F3, F3
39+
FSQRTD F3, F3
40+
FMULD F3, F2, F3
41+
FMOVD F3, ret+16(FP)
42+
RET
43+
44+
isNaN:
45+
MOVD $NaN, R0
46+
FMOVD R0, F29 // F29 is NaN
47+
FMOVD F29, ret+16(FP) // return NaN
48+
RET
49+
isInf:
50+
FMOVD F30, ret+16(FP) // return +Inf
51+
RET
52+
isZero:
53+
// R0 has been set to zero
54+
MOVD R0, ret+16(FP) // return 0
55+
RET

‎src/math/hypot_asm.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build 386 || amd64
5+
//go:build 386 || amd64 || arm64
6+
// +build 386 amd64 arm64
67

78
package math
89

‎src/math/hypot_noasm.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !386 && !amd64
5+
//go:build !386 && !amd64 && !arm64
6+
// +build !386,!amd64,!arm64
67

78
package math
89

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /