Skip to content

Commit e85ba85

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

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed

doc/go1.19.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
807807
Compared to v2, it is now typically 1.5x to 2x faster, uses half
808808
as much memory, and it supports an unlimited number of
809809
goroutines.
810+
On Linux, the race detector now requires at least glibc version 2.17.
810811
</p>
811812

812813
<p><!-- CL 336549 -->

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)