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

Side by Side Diff: sysdeps/i386/fpu/e_scalbf.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_scalb.S ('k') | sysdeps/i386/fpu/e_scalbl.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 * Adapted for float type by Ulrich Drepper <drepper@cygnus.com>. 4 * Adapted for float type by Ulrich Drepper <drepper@cygnus.com>.
5 * 5 *
6 * Correct handling of y==-inf <drepper@gnu> 6 * Correct handling of y==-inf <drepper@gnu>
7 */ 7 */
8 8
9 #include <machine/asm.h> 9 #include <machine/asm.h>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 cmpl $0x0100, %eax 54 cmpl $0x0100, %eax
55 je 3f 55 je 3f
56 fld %st(1) 56 fld %st(1)
57 frndint 57 frndint
58 fcomp %st(2) 58 fcomp %st(2)
59 fnstsw 59 fnstsw
60 sahf 60 sahf
61 jne 4f 61 jne 4f
62 fscale 62 fscale
63 fstp %st(1) 63 fstp %st(1)
64 » ret 64 » NACLRET
65 65
66 /* y is -inf */ 66 /* y is -inf */
67 1: fxam 67 1: fxam
68 #ifdef PIC 68 #ifdef PIC
69 LOAD_PIC_REG (cx) 69 LOAD_PIC_REG (cx)
70 #endif 70 #endif
71 fnstsw 71 fnstsw
72 movl 4(%esp), %edx 72 movl 4(%esp), %edx
73 shrl $5, %eax 73 shrl $5, %eax
74 fstp %st 74 fstp %st
75 fstp %st 75 fstp %st
76 andl $0x80000000, %edx 76 andl $0x80000000, %edx
77 andl $8, %eax 77 andl $8, %eax
78 jnz 4f 78 jnz 4f
79 shrl $27, %edx 79 shrl $27, %edx
80 addl %edx, %eax 80 addl %edx, %eax
81 fldl MOX(zero_nan, %eax, 1) 81 fldl MOX(zero_nan, %eax, 1)
82 » ret 82 » NACLRET
83 83
84 /* The result is NaN, but we must not raise an exception. 84 /* The result is NaN, but we must not raise an exception.
85 So use a variable. */ 85 So use a variable. */
86 2: fstp %st 86 2: fstp %st
87 fstp %st 87 fstp %st
88 #ifdef PIC 88 #ifdef PIC
89 LOAD_PIC_REG (cx) 89 LOAD_PIC_REG (cx)
90 #endif 90 #endif
91 fldl MO(nan) 91 fldl MO(nan)
92 » ret 92 » NACLRET
93 93
94 /* The first parameter is a NaN. Return it. */ 94 /* The first parameter is a NaN. Return it. */
95 3: fstp %st(1) 95 3: fstp %st(1)
96 » ret 96 » NACLRET
97 97
98 /* Return NaN and raise the invalid exception. */ 98 /* Return NaN and raise the invalid exception. */
99 4: fstp %st 99 4: fstp %st
100 fstp %st 100 fstp %st
101 fldz 101 fldz
102 fdiv %st 102 fdiv %st
103 » ret 103 » NACLRET
104 END(__ieee754_scalbf) 104 END(__ieee754_scalbf)
OLDNEW
« no previous file with comments | « sysdeps/i386/fpu/e_scalb.S ('k') | sysdeps/i386/fpu/e_scalbl.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698