Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Delta Between Two Patch Sets: src/pkg/math/tan_386.s

Issue 160200044: [dev.power64] code review 160200044: build: merge default into dev.power64 (Closed)
Left Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Right Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/math/sqrt_arm.s ('k') | src/pkg/math/tan_amd64.s » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2010 The Go Authors. All rights reserved. 1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include "../../cmd/ld/textflag.h" 5 #include "textflag.h"
6 6
7 // func Tan(x float64) float64 7 // func Tan(x float64) float64
8 TEXT ·Tan(SB),NOSPLIT,$0 8 TEXT ·Tan(SB),NOSPLIT,$0
9 FMOVD x+0(FP), F0 // F0=x 9 FMOVD x+0(FP), F0 // F0=x
10 FPTAN // F0=1, F1=tan(x) if -2**63 < x < 2**63 10 FPTAN // F0=1, F1=tan(x) if -2**63 < x < 2**63
11 FSTSW AX // AX=status word 11 FSTSW AX // AX=status word
12 ANDW $0x0400, AX 12 ANDW $0x0400, AX
13 JNE 4(PC) // jump if x outside range 13 JNE 4(PC) // jump if x outside range
14 FMOVDP F0, F0 // F0=tan(x) 14 FMOVDP F0, F0 // F0=tan(x)
15 FMOVDP F0, ret+8(FP) 15 FMOVDP F0, ret+8(FP)
16 RET 16 RET
17 FLDPI // F0=Pi, F1=x 17 FLDPI // F0=Pi, F1=x
18 FADDD F0, F0 // F0=2*Pi, F1=x 18 FADDD F0, F0 // F0=2*Pi, F1=x
19 FXCHD F0, F1 // F0=x, F1=2*Pi 19 FXCHD F0, F1 // F0=x, F1=2*Pi
20 FPREM1 // F0=reduced_x, F1=2*Pi 20 FPREM1 // F0=reduced_x, F1=2*Pi
21 FSTSW AX // AX=status word 21 FSTSW AX // AX=status word
22 ANDW $0x0400, AX 22 ANDW $0x0400, AX
23 JNE -3(PC) // jump if reduction incomplete 23 JNE -3(PC) // jump if reduction incomplete
24 FMOVDP F0, F1 // F0=reduced_x 24 FMOVDP F0, F1 // F0=reduced_x
25 FPTAN // F0=1, F1=tan(reduced_x) 25 FPTAN // F0=1, F1=tan(reduced_x)
26 FMOVDP F0, F0 // F0=tan(reduced_x) 26 FMOVDP F0, F0 // F0=tan(reduced_x)
27 FMOVDP F0, ret+8(FP) 27 FMOVDP F0, ret+8(FP)
28 RET 28 RET
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b