Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: sysdeps/i386/fpu/e_scalb.S

Issue 3539003: Fix up RET instructions in sysdeps/i386/fpu (Closed) Base URL: ssh://gitrw.chromium.org/nacl-glibc
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sysdeps/i386/fpu/e_remainderl.S ('k') | sysdeps/i386/fpu/e_scalbf.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 /* 1 /*
2 * Written by J.T. Conklin <jtc@netbsd.org>. 2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain. 3 * Public domain.
4 * 4 *
5 * Correct handling of y==-inf <drepper@gnu> 5 * Correct handling of y==-inf <drepper@gnu>
6 */ 6 */
7 7
8 #include <machine/asm.h> 8 #include <machine/asm.h>
9 9
10 RCSID("$NetBSD: e_scalb.S,v 1.4 1995/05/08 23:49:52 jtc Exp $") 10 RCSID("$NetBSD: e_scalb.S,v 1.4 1995/05/08 23:49:52 jtc Exp $")
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 cmpl $0x0100, %eax 52 cmpl $0x0100, %eax
53 je 3f 53 je 3f
54 fld %st(1) 54 fld %st(1)
55 frndint 55 frndint
56 fcomp %st(2) 56 fcomp %st(2)
57 fnstsw 57 fnstsw
58 sahf 58 sahf
59 jne 4f 59 jne 4f
60 fscale 60 fscale
61 fstp %st(1) 61 fstp %st(1)
62 » ret 62 » NACLRET
63 63
64 /* y is -inf */ 64 /* y is -inf */
65 1: fxam 65 1: fxam
66 #ifdef PIC 66 #ifdef PIC
67 LOAD_PIC_REG (cx) 67 LOAD_PIC_REG (cx)
68 #endif 68 #endif
69 fnstsw 69 fnstsw
70 movl 8(%esp), %edx 70 movl 8(%esp), %edx
71 shrl $5, %eax 71 shrl $5, %eax
72 fstp %st 72 fstp %st
73 fstp %st 73 fstp %st
74 andl $0x80000000, %edx 74 andl $0x80000000, %edx
75 andl $8, %eax 75 andl $8, %eax
76 jnz 4f 76 jnz 4f
77 shrl $27, %edx 77 shrl $27, %edx
78 addl %edx, %eax 78 addl %edx, %eax
79 fldl MOX(zero_nan, %eax, 1) 79 fldl MOX(zero_nan, %eax, 1)
80 » ret 80 » NACLRET
81 81
82 /* The result is NaN, but we must not raise an exception. 82 /* The result is NaN, but we must not raise an exception.
83 So use a variable. */ 83 So use a variable. */
84 2: fstp %st 84 2: fstp %st
85 fstp %st 85 fstp %st
86 #ifdef PIC 86 #ifdef PIC
87 LOAD_PIC_REG (cx) 87 LOAD_PIC_REG (cx)
88 #endif 88 #endif
89 fldl MO(nan) 89 fldl MO(nan)
90 » ret 90 » NACLRET
91 91
92 /* The first parameter is a NaN. Return it. */ 92 /* The first parameter is a NaN. Return it. */
93 3: fstp %st(1) 93 3: fstp %st(1)
94 » ret 94 » NACLRET
95 95
96 /* Return NaN and raise the invalid exception. */ 96 /* Return NaN and raise the invalid exception. */
97 4: fstp %st 97 4: fstp %st
98 fstp %st 98 fstp %st
99 fldz 99 fldz
100 fdiv %st 100 fdiv %st
101 » ret 101 » NACLRET
102 END(__ieee754_scalb) 102 END(__ieee754_scalb)
OLDNEW
« no previous file with comments | « sysdeps/i386/fpu/e_remainderl.S ('k') | sysdeps/i386/fpu/e_scalbf.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698