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

Side by Side Diff: sysdeps/i386/fpu/e_exp10f.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_exp10.S ('k') | sysdeps/i386/fpu/e_exp10l.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 Ulrich Drepper. 2 * Written by Ulrich Drepper.
3 */ 3 */
4 4
5 #include <machine/asm.h> 5 #include <machine/asm.h>
6 6
7 /* e^x = 2^(x * log2(10)) */ 7 /* e^x = 2^(x * log2(10)) */
8 ENTRY(__ieee754_exp10f) 8 ENTRY(__ieee754_exp10f)
9 flds 4(%esp) 9 flds 4(%esp)
10 /* I added the following ugly construct because exp(+-Inf) resulted 10 /* I added the following ugly construct because exp(+-Inf) resulted
(...skipping 10 matching lines...) Expand all
21 fmulp /* x * log2(10) */ 21 fmulp /* x * log2(10) */
22 fld %st 22 fld %st
23 frndint /* int(x * log2(10)) */ 23 frndint /* int(x * log2(10)) */
24 fsubr %st,%st(1) /* fract(x * log2(10)) */ 24 fsubr %st,%st(1) /* fract(x * log2(10)) */
25 fxch 25 fxch
26 f2xm1 /* 2^(fract(x * log2(10))) - 1 */ 26 f2xm1 /* 2^(fract(x * log2(10))) - 1 */
27 fld1 27 fld1
28 faddp /* 2^(fract(x * log2(10))) */ 28 faddp /* 2^(fract(x * log2(10))) */
29 fscale /* e^x */ 29 fscale /* e^x */
30 fstp %st(1) 30 fstp %st(1)
31 » ret 31 » NACLRET
32 32
33 1: testl $0x200, %eax /* Test sign. */ 33 1: testl $0x200, %eax /* Test sign. */
34 jz 2f /* If positive, jump. */ 34 jz 2f /* If positive, jump. */
35 fstp %st 35 fstp %st
36 fldz /* Set result to 0. */ 36 fldz /* Set result to 0. */
37 2:» ret 37 2:» NACLRET
38 END (__ieee754_exp10f) 38 END (__ieee754_exp10f)
OLDNEW
« no previous file with comments | « sysdeps/i386/fpu/e_exp10.S ('k') | sysdeps/i386/fpu/e_exp10l.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698