| OLD | NEW |
| 1 /* ix87 specific implementation of complex exponential function for double. | 1 /* ix87 specific implementation of complex exponential function for double. |
| 2 Copyright (C) 1997, 2005 Free Software Foundation, Inc. | 2 Copyright (C) 1997, 2005 Free Software Foundation, Inc. |
| 3 This file is part of the GNU C Library. | 3 This file is part of the GNU C Library. |
| 4 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. | 4 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. |
| 5 | 5 |
| 6 The GNU C Library is free software; you can redistribute it and/or | 6 The GNU C Library is free software; you can redistribute it and/or |
| 7 modify it under the terms of the GNU Lesser General Public | 7 modify it under the terms of the GNU Lesser General Public |
| 8 License as published by the Free Software Foundation; either | 8 License as published by the Free Software Foundation; either |
| 9 version 2.1 of the License, or (at your option) any later version. | 9 version 2.1 of the License, or (at your option) any later version. |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 fmulp %st, %st(3) /* sin(y) : e^x : e^x * cos(y) */ | 112 fmulp %st, %st(3) /* sin(y) : e^x : e^x * cos(y) */ |
| 113 fmulp %st, %st(1) /* e^x * sin(y) : e^x * cos(y) */ | 113 fmulp %st, %st(1) /* e^x * sin(y) : e^x * cos(y) */ |
| 114 subl $8, %esp | 114 subl $8, %esp |
| 115 cfi_adjust_cfa_offset (8) | 115 cfi_adjust_cfa_offset (8) |
| 116 fstps 4(%esp) | 116 fstps 4(%esp) |
| 117 fstps (%esp) | 117 fstps (%esp) |
| 118 popl %eax | 118 popl %eax |
| 119 cfi_adjust_cfa_offset (-4) | 119 cfi_adjust_cfa_offset (-4) |
| 120 popl %edx | 120 popl %edx |
| 121 cfi_adjust_cfa_offset (-4) | 121 cfi_adjust_cfa_offset (-4) |
| 122 » ret | 122 » NACLRET |
| 123 | 123 |
| 124 /* We have to reduce the argument to fsincos. */ | 124 /* We have to reduce the argument to fsincos. */ |
| 125 .align ALIGNARG(4) | 125 .align ALIGNARG(4) |
| 126 7: fldt MO(twopi) /* 2*pi : y : e^x : e^x */ | 126 7: fldt MO(twopi) /* 2*pi : y : e^x : e^x */ |
| 127 fxch /* y : 2*pi : e^x : e^x */ | 127 fxch /* y : 2*pi : e^x : e^x */ |
| 128 8: fprem1 /* y%(2*pi) : 2*pi : e^x : e^x */ | 128 8: fprem1 /* y%(2*pi) : 2*pi : e^x : e^x */ |
| 129 fnstsw | 129 fnstsw |
| 130 testl $0x400, %eax | 130 testl $0x400, %eax |
| 131 jnz 8b | 131 jnz 8b |
| 132 fstp %st(1) /* y%(2*pi) : e^x : e^x */ | 132 fstp %st(1) /* y%(2*pi) : e^x : e^x */ |
| 133 fsincos /* cos(y) : sin(y) : e^x : e^x */ | 133 fsincos /* cos(y) : sin(y) : e^x : e^x */ |
| 134 fmulp %st, %st(3) | 134 fmulp %st, %st(3) |
| 135 fmulp %st, %st(1) | 135 fmulp %st, %st(1) |
| 136 subl $8, %esp | 136 subl $8, %esp |
| 137 cfi_adjust_cfa_offset (8) | 137 cfi_adjust_cfa_offset (8) |
| 138 fstps 4(%esp) | 138 fstps 4(%esp) |
| 139 fstps (%esp) | 139 fstps (%esp) |
| 140 popl %eax | 140 popl %eax |
| 141 cfi_adjust_cfa_offset (-4) | 141 cfi_adjust_cfa_offset (-4) |
| 142 popl %edx | 142 popl %edx |
| 143 cfi_adjust_cfa_offset (-4) | 143 cfi_adjust_cfa_offset (-4) |
| 144 » ret | 144 » NACLRET |
| 145 | 145 |
| 146 /* The real part is +-inf. We must make further differences. */ | 146 /* The real part is +-inf. We must make further differences. */ |
| 147 .align ALIGNARG(4) | 147 .align ALIGNARG(4) |
| 148 1: fxam /* y : x */ | 148 1: fxam /* y : x */ |
| 149 fnstsw | 149 fnstsw |
| 150 movb %ah, %dl | 150 movb %ah, %dl |
| 151 testb $0x01, %ah /* See above why 0x01 is usable here. */ | 151 testb $0x01, %ah /* See above why 0x01 is usable here. */ |
| 152 jne 3f | 152 jne 3f |
| 153 | 153 |
| 154 | 154 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 175 andl $0x80000000, %eax | 175 andl $0x80000000, %eax |
| 176 orl MOX(huge_nan_null_null,%edx,1), %eax | 176 orl MOX(huge_nan_null_null,%edx,1), %eax |
| 177 movl MOX(huge_nan_null_null,%edx,1), %ecx | 177 movl MOX(huge_nan_null_null,%edx,1), %ecx |
| 178 movl %eax, %edx | 178 movl %eax, %edx |
| 179 ftst | 179 ftst |
| 180 fnstsw | 180 fnstsw |
| 181 fstp %st(0) | 181 fstp %st(0) |
| 182 shll $23, %eax | 182 shll $23, %eax |
| 183 andl $0x80000000, %eax | 183 andl $0x80000000, %eax |
| 184 orl %ecx, %eax | 184 orl %ecx, %eax |
| 185 » ret | 185 » NACLRET |
| 186 /* We must reduce the argument to fsincos. */ | 186 /* We must reduce the argument to fsincos. */ |
| 187 .align ALIGNARG(4) | 187 .align ALIGNARG(4) |
| 188 5: fldt MO(twopi) | 188 5: fldt MO(twopi) |
| 189 fxch | 189 fxch |
| 190 6: fprem1 | 190 6: fprem1 |
| 191 fnstsw | 191 fnstsw |
| 192 testl $0x400, %eax | 192 testl $0x400, %eax |
| 193 jnz 6b | 193 jnz 6b |
| 194 fstp %st(1) | 194 fstp %st(1) |
| 195 fsincos | 195 fsincos |
| 196 fxch | 196 fxch |
| 197 ftst | 197 ftst |
| 198 fnstsw | 198 fnstsw |
| 199 fstp %st(0) | 199 fstp %st(0) |
| 200 shll $23, %eax | 200 shll $23, %eax |
| 201 andl $0x80000000, %eax | 201 andl $0x80000000, %eax |
| 202 orl MOX(huge_nan_null_null,%edx,1), %eax | 202 orl MOX(huge_nan_null_null,%edx,1), %eax |
| 203 movl MOX(huge_nan_null_null,%edx,1), %ecx | 203 movl MOX(huge_nan_null_null,%edx,1), %ecx |
| 204 movl %eax, %edx | 204 movl %eax, %edx |
| 205 ftst | 205 ftst |
| 206 fnstsw | 206 fnstsw |
| 207 fstp %st(0) | 207 fstp %st(0) |
| 208 shll $23, %eax | 208 shll $23, %eax |
| 209 andl $0x80000000, %eax | 209 andl $0x80000000, %eax |
| 210 orl %ecx, %eax | 210 orl %ecx, %eax |
| 211 » ret | 211 » NACLRET |
| 212 | 212 |
| 213 /* The real part is +-Inf and the imaginary part is +-0. So return | 213 /* The real part is +-Inf and the imaginary part is +-0. So return |
| 214 +-Inf+-0i. */ | 214 +-Inf+-0i. */ |
| 215 .align ALIGNARG(4) | 215 .align ALIGNARG(4) |
| 216 4: subl $4, %esp | 216 4: subl $4, %esp |
| 217 cfi_adjust_cfa_offset (4) | 217 cfi_adjust_cfa_offset (4) |
| 218 fstps (%esp) | 218 fstps (%esp) |
| 219 shrl $6, %edx | 219 shrl $6, %edx |
| 220 fstp %st(0) | 220 fstp %st(0) |
| 221 andl $8, %edx | 221 andl $8, %edx |
| 222 movl MOX(huge_nan_null_null,%edx,1), %eax | 222 movl MOX(huge_nan_null_null,%edx,1), %eax |
| 223 popl %edx | 223 popl %edx |
| 224 cfi_adjust_cfa_offset (-4) | 224 cfi_adjust_cfa_offset (-4) |
| 225 » ret | 225 » NACLRET |
| 226 | 226 |
| 227 /* The real part is +-Inf, the imaginary is also is not finite. */ | 227 /* The real part is +-Inf, the imaginary is also is not finite. */ |
| 228 .align ALIGNARG(4) | 228 .align ALIGNARG(4) |
| 229 3: fstp %st(0) | 229 3: fstp %st(0) |
| 230 fstp %st(0) /* <empty> */ | 230 fstp %st(0) /* <empty> */ |
| 231 andb $0x45, %ah | 231 andb $0x45, %ah |
| 232 andb $0x47, %dh | 232 andb $0x47, %dh |
| 233 xorb %dh, %ah | 233 xorb %dh, %ah |
| 234 jnz 30f | 234 jnz 30f |
| 235 flds MO(infinity) /* Raise invalid exception. */ | 235 flds MO(infinity) /* Raise invalid exception. */ |
| 236 fmuls MO(zero) | 236 fmuls MO(zero) |
| 237 fstp %st(0) | 237 fstp %st(0) |
| 238 30: movl %edx, %eax | 238 30: movl %edx, %eax |
| 239 shrl $6, %edx | 239 shrl $6, %edx |
| 240 shll $3, %eax | 240 shll $3, %eax |
| 241 andl $8, %edx | 241 andl $8, %edx |
| 242 andl $16, %eax | 242 andl $16, %eax |
| 243 orl %eax, %edx | 243 orl %eax, %edx |
| 244 | 244 |
| 245 movl MOX(huge_nan_null_null,%edx,1), %eax | 245 movl MOX(huge_nan_null_null,%edx,1), %eax |
| 246 movl MOX(huge_nan_null_null+4,%edx,1), %edx | 246 movl MOX(huge_nan_null_null+4,%edx,1), %edx |
| 247 » ret | 247 » NACLRET |
| 248 | 248 |
| 249 /* The real part is NaN. */ | 249 /* The real part is NaN. */ |
| 250 .align ALIGNARG(4) | 250 .align ALIGNARG(4) |
| 251 20: flds MO(infinity) /* Raise invalid exception. */ | 251 20: flds MO(infinity) /* Raise invalid exception. */ |
| 252 fmuls MO(zero) | 252 fmuls MO(zero) |
| 253 fstp %st(0) | 253 fstp %st(0) |
| 254 2: fstp %st(0) | 254 2: fstp %st(0) |
| 255 fstp %st(0) | 255 fstp %st(0) |
| 256 movl MO(huge_nan_null_null+4), %eax | 256 movl MO(huge_nan_null_null+4), %eax |
| 257 movl %eax, %edx | 257 movl %eax, %edx |
| 258 » ret | 258 » NACLRET |
| 259 | 259 |
| 260 END(__cexpf) | 260 END(__cexpf) |
| 261 weak_alias (__cexpf, cexpf) | 261 weak_alias (__cexpf, cexpf) |
| OLD | NEW |