Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
1f796634
Commit
1f796634
authored
Aug 12, 2013
by
Keith Randall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
math: convert textflags from numbers to symbols
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/12773044
parent
db324ccd
Changes
67
Hide whitespace changes
Inline
Side-by-side
Showing
67 changed files
with
223 additions
and
89 deletions
+223
-89
src/pkg/math/abs_386.s
src/pkg/math/abs_386.s
+3
-1
src/pkg/math/abs_amd64.s
src/pkg/math/abs_amd64.s
+3
-1
src/pkg/math/abs_arm.s
src/pkg/math/abs_arm.s
+3
-1
src/pkg/math/asin_386.s
src/pkg/math/asin_386.s
+4
-2
src/pkg/math/asin_amd64.s
src/pkg/math/asin_amd64.s
+4
-2
src/pkg/math/asin_arm.s
src/pkg/math/asin_arm.s
+4
-2
src/pkg/math/atan2_386.s
src/pkg/math/atan2_386.s
+3
-1
src/pkg/math/atan2_amd64.s
src/pkg/math/atan2_amd64.s
+3
-1
src/pkg/math/atan2_arm.s
src/pkg/math/atan2_arm.s
+3
-1
src/pkg/math/atan_386.s
src/pkg/math/atan_386.s
+3
-1
src/pkg/math/atan_amd64.s
src/pkg/math/atan_amd64.s
+3
-1
src/pkg/math/atan_arm.s
src/pkg/math/atan_arm.s
+3
-1
src/pkg/math/dim_386.s
src/pkg/math/dim_386.s
+5
-3
src/pkg/math/dim_amd64.s
src/pkg/math/dim_amd64.s
+5
-3
src/pkg/math/dim_arm.s
src/pkg/math/dim_arm.s
+5
-3
src/pkg/math/exp2_386.s
src/pkg/math/exp2_386.s
+3
-1
src/pkg/math/exp2_amd64.s
src/pkg/math/exp2_amd64.s
+3
-1
src/pkg/math/exp2_arm.s
src/pkg/math/exp2_arm.s
+3
-1
src/pkg/math/exp_386.s
src/pkg/math/exp_386.s
+3
-1
src/pkg/math/exp_amd64.s
src/pkg/math/exp_amd64.s
+3
-1
src/pkg/math/exp_arm.s
src/pkg/math/exp_arm.s
+3
-1
src/pkg/math/expm1_386.s
src/pkg/math/expm1_386.s
+3
-1
src/pkg/math/expm1_amd64.s
src/pkg/math/expm1_amd64.s
+3
-1
src/pkg/math/expm1_arm.s
src/pkg/math/expm1_arm.s
+3
-1
src/pkg/math/floor_386.s
src/pkg/math/floor_386.s
+5
-3
src/pkg/math/floor_amd64.s
src/pkg/math/floor_amd64.s
+5
-3
src/pkg/math/floor_arm.s
src/pkg/math/floor_arm.s
+5
-3
src/pkg/math/fltasm_amd64.s
src/pkg/math/fltasm_amd64.s
+4
-2
src/pkg/math/frexp_386.s
src/pkg/math/frexp_386.s
+3
-1
src/pkg/math/frexp_amd64.s
src/pkg/math/frexp_amd64.s
+3
-1
src/pkg/math/frexp_arm.s
src/pkg/math/frexp_arm.s
+3
-1
src/pkg/math/hypot_386.s
src/pkg/math/hypot_386.s
+3
-1
src/pkg/math/hypot_amd64.s
src/pkg/math/hypot_amd64.s
+3
-1
src/pkg/math/hypot_arm.s
src/pkg/math/hypot_arm.s
+3
-1
src/pkg/math/ldexp_386.s
src/pkg/math/ldexp_386.s
+3
-1
src/pkg/math/ldexp_amd64.s
src/pkg/math/ldexp_amd64.s
+3
-1
src/pkg/math/ldexp_arm.s
src/pkg/math/ldexp_arm.s
+3
-1
src/pkg/math/log10_386.s
src/pkg/math/log10_386.s
+4
-2
src/pkg/math/log10_amd64.s
src/pkg/math/log10_amd64.s
+4
-2
src/pkg/math/log10_arm.s
src/pkg/math/log10_arm.s
+4
-2
src/pkg/math/log1p_386.s
src/pkg/math/log1p_386.s
+3
-1
src/pkg/math/log1p_amd64.s
src/pkg/math/log1p_amd64.s
+3
-1
src/pkg/math/log1p_arm.s
src/pkg/math/log1p_arm.s
+3
-1
src/pkg/math/log_386.s
src/pkg/math/log_386.s
+3
-1
src/pkg/math/log_amd64.s
src/pkg/math/log_amd64.s
+3
-1
src/pkg/math/log_arm.s
src/pkg/math/log_arm.s
+3
-1
src/pkg/math/mod_386.s
src/pkg/math/mod_386.s
+3
-1
src/pkg/math/mod_amd64.s
src/pkg/math/mod_amd64.s
+3
-1
src/pkg/math/mod_arm.s
src/pkg/math/mod_arm.s
+3
-1
src/pkg/math/modf_386.s
src/pkg/math/modf_386.s
+3
-1
src/pkg/math/modf_amd64.s
src/pkg/math/modf_amd64.s
+3
-1
src/pkg/math/modf_arm.s
src/pkg/math/modf_arm.s
+3
-1
src/pkg/math/remainder_386.s
src/pkg/math/remainder_386.s
+3
-1
src/pkg/math/remainder_amd64.s
src/pkg/math/remainder_amd64.s
+3
-1
src/pkg/math/remainder_arm.s
src/pkg/math/remainder_arm.s
+3
-1
src/pkg/math/sin_386.s
src/pkg/math/sin_386.s
+4
-2
src/pkg/math/sin_amd64.s
src/pkg/math/sin_amd64.s
+4
-2
src/pkg/math/sin_arm.s
src/pkg/math/sin_arm.s
+4
-2
src/pkg/math/sincos_386.s
src/pkg/math/sincos_386.s
+3
-1
src/pkg/math/sincos_amd64.s
src/pkg/math/sincos_amd64.s
+3
-1
src/pkg/math/sincos_arm.s
src/pkg/math/sincos_arm.s
+3
-1
src/pkg/math/sqrt_386.s
src/pkg/math/sqrt_386.s
+3
-1
src/pkg/math/sqrt_amd64.s
src/pkg/math/sqrt_amd64.s
+3
-1
src/pkg/math/sqrt_arm.s
src/pkg/math/sqrt_arm.s
+3
-1
src/pkg/math/tan_386.s
src/pkg/math/tan_386.s
+3
-1
src/pkg/math/tan_amd64.s
src/pkg/math/tan_amd64.s
+3
-1
src/pkg/math/tan_arm.s
src/pkg/math/tan_arm.s
+3
-1
No files found.
src/pkg/math/abs_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Abs
(
x
float64
)
float64
TEXT
·
Abs
(
SB
),
7
,$0
TEXT
·
Abs
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FABS
//
F0
=
|x|
FMOVDP
F0
,
ret
+
8
(
FP
)
...
...
src/pkg/math/abs_amd64.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Abs
(
x
float64
)
float64
TEXT
·
Abs
(
SB
),
7
,$0
TEXT
·
Abs
(
SB
),
NOSPLIT
,$0
MOVQ
$
(
1
<<
63
),
BX
MOVQ
BX
,
X0
//
movsd
$
(-
0
.0
),
x0
MOVSD
x
+
0
(
FP
),
X1
...
...
src/pkg/math/abs_arm.s
View file @
1f796634
...
...
@@ -2,7 +2,9 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Abs
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Abs
(
SB
),
NOSPLIT
,$0
MOVW
x_lo
+
0
(
FP
),
R0
MOVW
x_hi
+
4
(
FP
),
R1
AND
$
((
1
<<
31
)-
1
),
R1
...
...
src/pkg/math/asin_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Asin
(
x
float64
)
float64
TEXT
·
Asin
(
SB
),
7
,$0
TEXT
·
Asin
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
sin
(
x
)
FMOVD
F0
,
F1
//
F0
=
sin
(
x
),
F1
=
sin
(
x
)
FMULD
F0
,
F0
//
F0
=
sin
(
x
)*
sin
(
x
),
F1
=
sin
(
x
)
...
...
@@ -15,7 +17,7 @@ TEXT ·Asin(SB),7,$0
RET
//
func
Acos
(
x
float64
)
float64
TEXT
·
Acos
(
SB
),
7
,$0
TEXT
·
Acos
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
cos
(
x
)
FMOVD
F0
,
F1
//
F0
=
cos
(
x
),
F1
=
cos
(
x
)
FMULD
F0
,
F0
//
F0
=
cos
(
x
)*
cos
(
x
),
F1
=
cos
(
x
)
...
...
src/pkg/math/asin_amd64.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Asin
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Asin
(
SB
),
NOSPLIT
,$0
JMP
·
asin
(
SB
)
TEXT
·
Acos
(
SB
),
7
,$0
TEXT
·
Acos
(
SB
),
NOSPLIT
,$0
JMP
·
acos
(
SB
)
src/pkg/math/asin_arm.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Asin
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Asin
(
SB
),
NOSPLIT
,$0
B
·
asin
(
SB
)
TEXT
·
Acos
(
SB
),
7
,$0
TEXT
·
Acos
(
SB
),
NOSPLIT
,$0
B
·
acos
(
SB
)
src/pkg/math/atan2_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Atan2
(
y
,
x
float64
)
float64
//
=
atan
(
y
/
x
)
TEXT
·
Atan2
(
SB
),
7
,$0
TEXT
·
Atan2
(
SB
),
NOSPLIT
,$0
FMOVD
y
+
0
(
FP
),
F0
//
F0
=
y
FMOVD
x
+
8
(
FP
),
F0
//
F0
=
x
,
F1
=
y
FPATAN
//
F0
=
atan
(
F1
/
F0
)
...
...
src/pkg/math/atan2_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Atan2
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Atan2
(
SB
),
NOSPLIT
,$0
JMP
·
atan2
(
SB
)
src/pkg/math/atan2_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Atan2
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Atan2
(
SB
),
NOSPLIT
,$0
B
·
atan2
(
SB
)
src/pkg/math/atan_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Atan
(
x
float64
)
float64
TEXT
·
Atan
(
SB
),
7
,$0
TEXT
·
Atan
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FLD1
//
F0
=
1
,
F1
=
x
FPATAN
//
F0
=
atan
(
F1
/
F0
)
...
...
src/pkg/math/atan_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Atan
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Atan
(
SB
),
NOSPLIT
,$0
JMP
·
atan
(
SB
)
src/pkg/math/atan_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Atan
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Atan
(
SB
),
NOSPLIT
,$0
B
·
atan
(
SB
)
src/pkg/math/dim_386.s
View file @
1f796634
...
...
@@ -2,11 +2,13 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Dim
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Dim
(
SB
),
NOSPLIT
,$0
JMP
·
dim
(
SB
)
TEXT
·
Max
(
SB
),
7
,$0
TEXT
·
Max
(
SB
),
NOSPLIT
,$0
JMP
·
max
(
SB
)
TEXT
·
Min
(
SB
),
7
,$0
TEXT
·
Min
(
SB
),
NOSPLIT
,$0
JMP
·
min
(
SB
)
src/pkg/math/dim_amd64.s
View file @
1f796634
...
...
@@ -2,12 +2,14 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
#define PosInf 0x7FF0000000000000
#define NaN 0x7FF8000000000001
#define NegInf 0xFFF0000000000000
//
func
Dim
(
x
,
y
float64
)
float64
TEXT
·
Dim
(
SB
),
7
,$0
TEXT
·
Dim
(
SB
),
NOSPLIT
,$0
//
(+
Inf
,
+
Inf
)
special
case
MOVQ
x
+
0
(
FP
),
BX
MOVQ
y
+
8
(
FP
),
CX
...
...
@@ -45,7 +47,7 @@ isDimNaN:
RET
//
func
·
Max
(
x
,
y
float64
)
float64
TEXT
·
Max
(
SB
),
7
,$0
TEXT
·
Max
(
SB
),
NOSPLIT
,$0
//
+
Inf
special
cases
MOVQ
$PosInf
,
AX
MOVQ
x
+
0
(
FP
),
R8
...
...
@@ -98,7 +100,7 @@ isMaxZero:
*/
//
func
Min
(
x
,
y
float64
)
float64
TEXT
·
Min
(
SB
),
7
,$0
TEXT
·
Min
(
SB
),
NOSPLIT
,$0
//
-
Inf
special
cases
MOVQ
$NegInf
,
AX
MOVQ
x
+
0
(
FP
),
R8
...
...
src/pkg/math/dim_arm.s
View file @
1f796634
...
...
@@ -2,11 +2,13 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Dim
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Dim
(
SB
),
NOSPLIT
,$0
B
·
dim
(
SB
)
TEXT
·
Min
(
SB
),
7
,$0
TEXT
·
Min
(
SB
),
NOSPLIT
,$0
B
·
min
(
SB
)
TEXT
·
Max
(
SB
),
7
,$0
TEXT
·
Max
(
SB
),
NOSPLIT
,$0
B
·
max
(
SB
)
src/pkg/math/exp2_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Exp2
(
x
float64
)
float64
TEXT
·
Exp2
(
SB
),
7
,$0
TEXT
·
Exp2
(
SB
),
NOSPLIT
,$0
//
test
bits
for
not
-
finite
MOVL
x_hi
+
4
(
FP
),
AX
ANDL
$
0x7ff00000
,
AX
...
...
src/pkg/math/exp2_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Exp2
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Exp2
(
SB
),
NOSPLIT
,$0
JMP
·
exp2
(
SB
)
src/pkg/math/exp2_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Exp2
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Exp2
(
SB
),
NOSPLIT
,$0
B
·
exp2
(
SB
)
src/pkg/math/exp_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Exp
(
x
float64
)
float64
TEXT
·
Exp
(
SB
),
7
,$0
TEXT
·
Exp
(
SB
),
NOSPLIT
,$0
//
test
bits
for
not
-
finite
MOVL
x_hi
+
4
(
FP
),
AX
ANDL
$
0x7ff00000
,
AX
...
...
src/pkg/math/exp_amd64.s
View file @
1f796634
...
...
@@ -2,6 +2,8 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
The
method
is
based
on
a
paper
by
Naoki
Shibata
:
"Efficient evaluation
//
methods
of
elementary
functions
suitable
for
SIMD
computation
", Proc.
//
of
International
Supercomputing
Conference
2010
(
ISC
'10), pp. 25 -- 32
...
...
@@ -31,7 +33,7 @@
#define NegInf 0xFFF0000000000000
//
func
Exp
(
x
float64
)
float64
TEXT
·
Exp
(
SB
),
7
,$0
TEXT
·
Exp
(
SB
),
NOSPLIT
,$0
//
test
bits
for
not
-
finite
MOVQ
x
+
0
(
FP
),
BX
MOVQ
$~
(
1
<<
63
),
AX
//
sign
bit
mask
...
...
src/pkg/math/exp_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Exp
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Exp
(
SB
),
NOSPLIT
,$0
B
·
exp
(
SB
)
src/pkg/math/expm1_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Expm1
(
x
float64
)
float64
TEXT
·
Expm1
(
SB
),
7
,$0
TEXT
·
Expm1
(
SB
),
NOSPLIT
,$0
FLDLN2
//
F0
=
log
(
2
)
=
1
/
log2
(
e
)
~
0
.693147
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
,
F1
=
1
/
log2
(
e
)
FABS
//
F0
=
|x|
,
F1
=
1
/
log2
(
e
)
...
...
src/pkg/math/expm1_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Expm1
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Expm1
(
SB
),
NOSPLIT
,$0
JMP
·
expm1
(
SB
)
src/pkg/math/expm1_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Expm1
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Expm1
(
SB
),
NOSPLIT
,$0
B
·
expm1
(
SB
)
src/pkg/math/floor_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Ceil
(
x
float64
)
float64
TEXT
·
Ceil
(
SB
),
7
,$0
TEXT
·
Ceil
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FSTCW
-
2
(
SP
)
//
save
old
Control
Word
MOVW
-
2
(
SP
),
AX
...
...
@@ -17,7 +19,7 @@ TEXT ·Ceil(SB),7,$0
RET
//
func
Floor
(
x
float64
)
float64
TEXT
·
Floor
(
SB
),
7
,$0
TEXT
·
Floor
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FSTCW
-
2
(
SP
)
//
save
old
Control
Word
MOVW
-
2
(
SP
),
AX
...
...
@@ -31,7 +33,7 @@ TEXT ·Floor(SB),7,$0
RET
//
func
Trunc
(
x
float64
)
float64
TEXT
·
Trunc
(
SB
),
7
,$0
TEXT
·
Trunc
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FSTCW
-
2
(
SP
)
//
save
old
Control
Word
MOVW
-
2
(
SP
),
AX
...
...
src/pkg/math/floor_amd64.s
View file @
1f796634
...
...
@@ -2,10 +2,12 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
#define Big 0x4330000000000000 // 2**52
//
func
Floor
(
x
float64
)
float64
TEXT
·
Floor
(
SB
),
7
,$0
TEXT
·
Floor
(
SB
),
NOSPLIT
,$0
MOVQ
x
+
0
(
FP
),
AX
MOVQ
$~
(
1
<<
63
),
DX
//
sign
bit
mask
ANDQ
AX
,
DX
//
DX
=
|x|
...
...
@@ -27,7 +29,7 @@ isBig_floor:
RET
//
func
Ceil
(
x
float64
)
float64
TEXT
·
Ceil
(
SB
),
7
,$0
TEXT
·
Ceil
(
SB
),
NOSPLIT
,$0
MOVQ
x
+
0
(
FP
),
AX
MOVQ
$~
(
1
<<
63
),
DX
//
sign
bit
mask
MOVQ
AX
,
BX
//
BX
=
copy
of
x
...
...
@@ -53,7 +55,7 @@ isBig_ceil:
RET
//
func
Trunc
(
x
float64
)
float64
TEXT
·
Trunc
(
SB
),
7
,$0
TEXT
·
Trunc
(
SB
),
NOSPLIT
,$0
MOVQ
x
+
0
(
FP
),
AX
MOVQ
$~
(
1
<<
63
),
DX
//
sign
bit
mask
MOVQ
AX
,
BX
//
BX
=
copy
of
x
...
...
src/pkg/math/floor_arm.s
View file @
1f796634
...
...
@@ -2,11 +2,13 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Floor
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Floor
(
SB
),
NOSPLIT
,$0
B
·
floor
(
SB
)
TEXT
·
Ceil
(
SB
),
7
,$0
TEXT
·
Ceil
(
SB
),
NOSPLIT
,$0
B
·
ceil
(
SB
)
TEXT
·
Trunc
(
SB
),
7
,$0
TEXT
·
Trunc
(
SB
),
NOSPLIT
,$0
B
·
trunc
(
SB
)
src/pkg/math/fltasm_amd64.s
View file @
1f796634
...
...
@@ -23,7 +23,9 @@
//
OUT
OF
OR
IN
CONNECTION
WITH
THE
SOFTWARE
OR
THE
USE
OR
OTHER
DEALINGS
IN
//
THE
SOFTWARE
.
TEXT
·
SetFPControl
(
SB
),
7
,
$
8
#include "../../cmd/ld/textflag.h"
TEXT
·
SetFPControl
(
SB
),
NOSPLIT
,
$
8
//
Set
new
MOVL
p
+
0
(
FP
),
DI
XORL
$
(
0x3F
<<
7
),
DI
...
...
@@ -37,7 +39,7 @@ TEXT ·SetFPControl(SB), 7, $8
LDMXCSR
0
(
SP
)
RET
TEXT
·
GetFPControl
(
SB
),
7
,
$
0
TEXT
·
GetFPControl
(
SB
),
NOSPLIT
,
$
0
WAIT
STMXCSR
0
(
SP
)
MOVWLZX
0
(
SP
),
AX
...
...
src/pkg/math/frexp_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Frexp
(
f
float64
)
(
frac
float64
,
exp
int
)
TEXT
·
Frexp
(
SB
),
7
,$0
TEXT
·
Frexp
(
SB
),
NOSPLIT
,$0
FMOVD
f
+
0
(
FP
),
F0
//
F0
=
f
FXAM
FSTSW
AX
...
...
src/pkg/math/frexp_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Frexp
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Frexp
(
SB
),
NOSPLIT
,$0
JMP
·
frexp
(
SB
)
src/pkg/math/frexp_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Frexp
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Frexp
(
SB
),
NOSPLIT
,$0
B
·
frexp
(
SB
)
src/pkg/math/hypot_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Hypot
(
p
,
q
float64
)
float64
TEXT
·
Hypot
(
SB
),
7
,$0
TEXT
·
Hypot
(
SB
),
NOSPLIT
,$0
//
test
bits
for
not
-
finite
MOVL
p_hi
+
4
(
FP
),
AX
//
high
word
p
ANDL
$
0x7ff00000
,
AX
...
...
src/pkg/math/hypot_amd64.s
View file @
1f796634
...
...
@@ -2,11 +2,13 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
#define PosInf 0x7FF0000000000000
#define NaN 0x7FF8000000000001
//
func
Hypot
(
p
,
q
float64
)
float64
TEXT
·
Hypot
(
SB
),
7
,$0
TEXT
·
Hypot
(
SB
),
NOSPLIT
,$0
//
test
bits
for
special
cases
MOVQ
p
+
0
(
FP
),
BX
MOVQ
$~
(
1
<<
63
),
AX
...
...
src/pkg/math/hypot_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Hypot
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Hypot
(
SB
),
NOSPLIT
,$0
B
·
hypot
(
SB
)
src/pkg/math/ldexp_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Ldexp
(
frac
float64
,
exp
int
)
float64
TEXT
·
Ldexp
(
SB
),
7
,$0
TEXT
·
Ldexp
(
SB
),
NOSPLIT
,$0
FMOVL
exp
+
8
(
FP
),
F0
//
F0
=
exp
FMOVD
frac
+
0
(
FP
),
F0
//
F0
=
frac
,
F1
=
e
FSCALE
//
F0
=
x
*
2
**
e
,
F1
=
e
...
...
src/pkg/math/ldexp_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Ldexp
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Ldexp
(
SB
),
NOSPLIT
,$0
JMP
·
ldexp
(
SB
)
src/pkg/math/ldexp_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Ldexp
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Ldexp
(
SB
),
NOSPLIT
,$0
B
·
ldexp
(
SB
)
src/pkg/math/log10_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Log10
(
x
float64
)
float64
TEXT
·
Log10
(
SB
),
7
,$0
TEXT
·
Log10
(
SB
),
NOSPLIT
,$0
FLDLG2
//
F0
=
log10
(
2
)
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
,
F1
=
log10
(
2
)
FYL2X
//
F0
=
log10
(
x
)=
log2
(
x
)*
log10
(
2
)
...
...
@@ -11,7 +13,7 @@ TEXT ·Log10(SB),7,$0
RET
//
func
Log2
(
x
float64
)
float64
TEXT
·
Log2
(
SB
),
7
,$0
TEXT
·
Log2
(
SB
),
NOSPLIT
,$0
FLD1
//
F0
=
1
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
,
F1
=
1
FYL2X
//
F0
=
log2
(
x
)
...
...
src/pkg/math/log10_amd64.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Log10
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Log10
(
SB
),
NOSPLIT
,$0
JMP
·
log10
(
SB
)
TEXT
·
Log2
(
SB
),
7
,$0
TEXT
·
Log2
(
SB
),
NOSPLIT
,$0
JMP
·
log2
(
SB
)
src/pkg/math/log10_arm.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Log10
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Log10
(
SB
),
NOSPLIT
,$0
B
·
log10
(
SB
)
TEXT
·
Log2
(
SB
),
7
,$0
TEXT
·
Log2
(
SB
),
NOSPLIT
,$0
B
·
log2
(
SB
)
src/pkg/math/log1p_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Log1p
(
x
float64
)
float64
TEXT
·
Log1p
(
SB
),
7
,$0
TEXT
·
Log1p
(
SB
),
NOSPLIT
,$0
FMOVD
$
(
2
.928932188134524e-01
),
F0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
,
F1
=
1
-
sqrt
(
2
)/
2
=
0
.29289321881345247559915564
FABS
//
F0
=
|x|
,
F1
=
1
-
sqrt
(
2
)/
2
...
...
src/pkg/math/log1p_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Log1p
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Log1p
(
SB
),
NOSPLIT
,$0
JMP
·
log1p
(
SB
)
src/pkg/math/log1p_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Log1p
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Log1p
(
SB
),
NOSPLIT
,$0
B
·
log1p
(
SB
)
src/pkg/math/log_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Log
(
x
float64
)
float64
TEXT
·
Log
(
SB
),
7
,$0
TEXT
·
Log
(
SB
),
NOSPLIT
,$0
FLDLN2
//
F0
=
log
(
2
)
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
,
F1
=
log
(
2
)
FYL2X
//
F0
=
log
(
x
)=
log2
(
x
)*
log
(
2
)
...
...
src/pkg/math/log_amd64.s
View file @
1f796634
...
...
@@ -2,6 +2,8 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
#define HSqrt2 7.07106781186547524401e-01 // sqrt(2)/2
#define Ln2Hi 6.93147180369123816490e-01 // 0x3fe62e42fee00000
#define Ln2Lo 1.90821492927058770002e-10 // 0x3dea39ef35793c76
...
...
@@ -17,7 +19,7 @@
#define PosInf 0x7FF0000000000000
//
func
Log
(
x
float64
)
float64
TEXT
·
Log
(
SB
),
7
,$0
TEXT
·
Log
(
SB
),
NOSPLIT
,$0
//
test
bits
for
special
cases
MOVQ
x
+
0
(
FP
),
BX
MOVQ
$~
(
1
<<
63
),
AX
//
sign
bit
mask
...
...
src/pkg/math/log_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Log
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Log
(
SB
),
NOSPLIT
,$0
B
·
log
(
SB
)
src/pkg/math/mod_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Mod
(
x
,
y
float64
)
float64
TEXT
·
Mod
(
SB
),
7
,$0
TEXT
·
Mod
(
SB
),
NOSPLIT
,$0
FMOVD
y
+
8
(
FP
),
F0
//
F0
=
y
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
,
F1
=
y
FPREM
//
F0
=
reduced_x
,
F1
=
y
...
...
src/pkg/math/mod_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Mod
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Mod
(
SB
),
NOSPLIT
,$0
JMP
·
mod
(
SB
)
src/pkg/math/mod_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Mod
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Mod
(
SB
),
NOSPLIT
,$0
B
·
mod
(
SB
)
src/pkg/math/modf_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Modf
(
f
float64
)
(
int
float64
,
frac
float64
)
TEXT
·
Modf
(
SB
),
7
,$0
TEXT
·
Modf
(
SB
),
NOSPLIT
,$0
FMOVD
f
+
0
(
FP
),
F0
//
F0
=
f
FMOVD
F0
,
F1
//
F0
=
f
,
F1
=
f
FSTCW
-
2
(
SP
)
//
save
old
Control
Word
...
...
src/pkg/math/modf_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Modf
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Modf
(
SB
),
NOSPLIT
,$0
JMP
·
modf
(
SB
)
src/pkg/math/modf_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Modf
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Modf
(
SB
),
NOSPLIT
,$0
B
·
modf
(
SB
)
src/pkg/math/remainder_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Remainder
(
x
,
y
float64
)
float64
TEXT
·
Remainder
(
SB
),
7
,$0
TEXT
·
Remainder
(
SB
),
NOSPLIT
,$0
FMOVD
y
+
8
(
FP
),
F0
//
F0
=
y
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
,
F1
=
y
FPREM1
//
F0
=
reduced_x
,
F1
=
y
...
...
src/pkg/math/remainder_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Remainder
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Remainder
(
SB
),
NOSPLIT
,$0
JMP
·
remainder
(
SB
)
src/pkg/math/remainder_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Remainder
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Remainder
(
SB
),
NOSPLIT
,$0
B
·
remainder
(
SB
)
src/pkg/math/sin_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Cos
(
x
float64
)
float64
TEXT
·
Cos
(
SB
),
7
,$0
TEXT
·
Cos
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FCOS
//
F0
=
cos
(
x
)
if
-
2
**
63
<
x
<
2
**
63
FSTSW
AX
//
AX
=
status
word
...
...
@@ -24,7 +26,7 @@ TEXT ·Cos(SB),7,$0
RET
//
func
Sin
(
x
float64
)
float64
TEXT
·
Sin
(
SB
),
7
,$0
TEXT
·
Sin
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FSIN
//
F0
=
sin
(
x
)
if
-
2
**
63
<
x
<
2
**
63
FSTSW
AX
//
AX
=
status
word
...
...
src/pkg/math/sin_amd64.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Sin
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Sin
(
SB
),
NOSPLIT
,$0
JMP
·
sin
(
SB
)
TEXT
·
Cos
(
SB
),
7
,$0
TEXT
·
Cos
(
SB
),
NOSPLIT
,$0
JMP
·
cos
(
SB
)
src/pkg/math/sin_arm.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Sin
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Sin
(
SB
),
NOSPLIT
,$0
B
·
sin
(
SB
)
TEXT
·
Cos
(
SB
),
7
,$0
TEXT
·
Cos
(
SB
),
NOSPLIT
,$0
B
·
cos
(
SB
)
src/pkg/math/sincos_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Sincos
(
x
float64
)
(
sin
,
cos
float64
)
TEXT
·
Sincos
(
SB
),
7
,$0
TEXT
·
Sincos
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FSINCOS
//
F0
=
cos
(
x
),
F1
=
sin
(
x
)
if
-
2
**
63
<
x
<
2
**
63
FSTSW
AX
//
AX
=
status
word
...
...
src/pkg/math/sincos_amd64.s
View file @
1f796634
...
...
@@ -2,6 +2,8 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
The
method
is
based
on
a
paper
by
Naoki
Shibata
:
"Efficient evaluation
//
methods
of
elementary
functions
suitable
for
SIMD
computation
", Proc.
//
of
International
Supercomputing
Conference
2010
(
ISC
'10), pp. 25 -- 32
...
...
@@ -31,7 +33,7 @@
#define T4 5.51146384479717813051146e-07 // (+1.0/1814400)
//
func
Sincos
(
d
float64
)
(
sin
,
cos
float64
)
TEXT
·
Sincos
(
SB
),
7
,$0
TEXT
·
Sincos
(
SB
),
NOSPLIT
,$0
//
test
for
special
cases
MOVQ
$~
(
1
<<
63
),
DX
//
sign
bit
mask
MOVQ
x
+
0
(
FP
),
BX
...
...
src/pkg/math/sincos_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Sincos
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Sincos
(
SB
),
NOSPLIT
,$0
B
·
sincos
(
SB
)
src/pkg/math/sqrt_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Sqrt
(
x
float64
)
float64
TEXT
·
Sqrt
(
SB
),
7
,$0
TEXT
·
Sqrt
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
FSQRT
FMOVDP
F0
,
ret
+
8
(
FP
)
...
...
src/pkg/math/sqrt_amd64.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Sqrt
(
x
float64
)
float64
TEXT
·
Sqrt
(
SB
),
7
,$0
TEXT
·
Sqrt
(
SB
),
NOSPLIT
,$0
SQRTSD
x
+
0
(
FP
),
X0
MOVSD
X0
,
ret
+
8
(
FP
)
RET
src/pkg/math/sqrt_arm.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Sqrt
(
x
float64
)
float64
TEXT
·
Sqrt
(
SB
),
7
,$0
TEXT
·
Sqrt
(
SB
),
NOSPLIT
,$0
MOVD
x
+
0
(
FP
),
F0
SQRTD
F0
,
F0
MOVD
F0
,
ret
+
8
(
FP
)
...
...
src/pkg/math/tan_386.s
View file @
1f796634
...
...
@@ -2,8 +2,10 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
#include "../../cmd/ld/textflag.h"
//
func
Tan
(
x
float64
)
float64
TEXT
·
Tan
(
SB
),
7
,$0
TEXT
·
Tan
(
SB
),
NOSPLIT
,$0
FMOVD
x
+
0
(
FP
),
F0
//
F0
=
x
FPTAN
//
F0
=
1
,
F1
=
tan
(
x
)
if
-
2
**
63
<
x
<
2
**
63
FSTSW
AX
//
AX
=
status
word
...
...
src/pkg/math/tan_amd64.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Tan
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Tan
(
SB
),
NOSPLIT
,$0
JMP
·
tan
(
SB
)
src/pkg/math/tan_arm.s
View file @
1f796634
...
...
@@ -2,5 +2,7 @@
//
Use
of
this
source
code
is
governed
by
a
BSD
-
style
//
license
that
can
be
found
in
the
LICENSE
file
.
TEXT
·
Tan
(
SB
),7,$0
#include "../../cmd/ld/textflag.h"
TEXT
·
Tan
(
SB
),
NOSPLIT
,$0
B
·
tan
(
SB
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment