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

Side by Side Diff: src/pkg/math/hypot_386.s

Issue 6461047: code review 6461047: math: update definition of NaN in assembly language files (Closed)
Patch Set: diff -r c37d3a28f6b0 https://go.googlecode.com/hg/ Created 12 years, 7 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:
View unified diff | Download patch
« no previous file with comments | « src/pkg/math/dim_amd64.s ('k') | src/pkg/math/hypot_amd64.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // func Hypot(x, y float64) float64 5 // func Hypot(x, y float64) float64
6 TEXT ·Hypot(SB),7,$0 6 TEXT ·Hypot(SB),7,$0
7 // test bits for not-finite 7 // test bits for not-finite
8 MOVL xh+4(FP), AX // high word x 8 MOVL xh+4(FP), AX // high word x
9 ANDL $0x7ff00000, AX 9 ANDL $0x7ff00000, AX
10 CMPL AX, $0x7ff00000 10 CMPL AX, $0x7ff00000
(...skipping 30 matching lines...) Expand all
41 MOVL xh+4(FP), AX // high word x 41 MOVL xh+4(FP), AX // high word x
42 ORL xl+0(FP), AX // low word x 42 ORL xl+0(FP), AX // low word x
43 ANDL $0x7fffffff, AX 43 ANDL $0x7fffffff, AX
44 CMPL AX, $0x7ff00000 44 CMPL AX, $0x7ff00000
45 JEQ is_inf 45 JEQ is_inf
46 MOVL yh+12(FP), AX // high word y 46 MOVL yh+12(FP), AX // high word y
47 ORL yl+8(FP), AX // low word y 47 ORL yl+8(FP), AX // low word y
48 ANDL $0x7fffffff, AX 48 ANDL $0x7fffffff, AX
49 CMPL AX, $0x7ff00000 49 CMPL AX, $0x7ff00000
50 JEQ is_inf 50 JEQ is_inf
51 » MOVL $0x7ff00000, rh+20(FP) // return NaN = 0x7FF0000000000001 51 » MOVL $0x7FF80000, rh+20(FP) // return NaN = 0x7FF8000000000001
52 MOVL $0x00000001, rl+16(FP) 52 MOVL $0x00000001, rl+16(FP)
53 RET 53 RET
54 is_inf: 54 is_inf:
55 MOVL AX, rh+20(FP) // return +Inf = 0x7FF0000000000000 55 MOVL AX, rh+20(FP) // return +Inf = 0x7FF0000000000000
56 MOVL $0x00000000, rl+16(FP) 56 MOVL $0x00000000, rl+16(FP)
57 RET 57 RET
OLDNEW
« no previous file with comments | « src/pkg/math/dim_amd64.s ('k') | src/pkg/math/hypot_amd64.s » ('j') | no next file with comments »

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