Print this page
5261 libm should stop using synonyms.h


  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23  */
  24 /*
  25  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file "exp10.s"
  30 
  31 #include "libm.h"
  32 LIBM_ANSI_PRAGMA_WEAK(exp10,function)
  33 #include "libm_synonyms.h"
  34 
  35         ENTRY(exp10)
  36         movl    8(%esp),%ecx            / ecx <-- hi_32(x)
  37         andl    $0x7fffffff,%ecx        / ecx <-- hi_32(|x|)
  38         cmpl    $0x3fd34413,%ecx        / Is |x| < log10(2)?
  39         jb      .shortcut               / If so, take a shortcut.
  40         je      .check_tail             / maybe |x| only slightly < log10(2)
  41         cmpl    $0x7ff00000,%ecx        / hi_32(|x|) >= hi_32(INF)?
  42         jae     .not_finite             / if so, x is not finite
  43 .finite_non_special:                    / Here, log10(2) < |x| < INF
  44         fldl    4(%esp)                 / push x (=arg)
  45 
  46         subl    $8,%esp                 / save RP and set round-to-64-bits
  47         fstcw   (%esp)
  48         movw    (%esp),%ax
  49         movw    %ax,4(%esp)
  50         orw     $0x0300,%ax
  51         movw    %ax,(%esp)
  52         fldcw   (%esp)
  53 




  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23  */
  24 /*
  25  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file "exp10.s"
  30 
  31 #include "libm.h"


  32 
  33         ENTRY(exp10)
  34         movl    8(%esp),%ecx            / ecx <-- hi_32(x)
  35         andl    $0x7fffffff,%ecx        / ecx <-- hi_32(|x|)
  36         cmpl    $0x3fd34413,%ecx        / Is |x| < log10(2)?
  37         jb      .shortcut               / If so, take a shortcut.
  38         je      .check_tail             / maybe |x| only slightly < log10(2)
  39         cmpl    $0x7ff00000,%ecx        / hi_32(|x|) >= hi_32(INF)?
  40         jae     .not_finite             / if so, x is not finite
  41 .finite_non_special:                    / Here, log10(2) < |x| < INF
  42         fldl    4(%esp)                 / push x (=arg)
  43 
  44         subl    $8,%esp                 / save RP and set round-to-64-bits
  45         fstcw   (%esp)
  46         movw    (%esp),%ax
  47         movw    %ax,4(%esp)
  48         orw     $0x0300,%ax
  49         movw    %ax,(%esp)
  50         fldcw   (%esp)
  51