Print this page
5261 libm should stop using synonyms.h


  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 "expl.s"
  30 
  31 #include "libm.h"
  32 LIBM_ANSI_PRAGMA_WEAK(expl,function)
  33 #include "libm_synonyms.h"
  34 
  35         .data
  36         .align  16
  37 ln2_hi: .4byte  0xd1d00000, 0xb17217f7, 0x3ffe, 0x0
  38 ln2_lo: .4byte  0x4c67fc0d, 0x8654361c, 0xbfce, 0x0
  39 
  40         ENTRY(expl)
  41         movl    16(%rsp),%ecx           / cx <--sign&bexp(x)
  42         andl    $0x7fff,%ecx            / ecx <-- zero_xtnd(bexp(x))
  43         cmpl    $0x3ffe,%ecx            / Is |x| < 0.5?
  44         jb      2f                      / If so, see which shortcut to take
  45         je      .check_tail             / More checking if 0.5 <= |x| < 1
  46 .general_case:                          / Here, |x| >= 1 or x is NaN
  47         cmpl    $0x7fff,%ecx            / bexp(|x|) = bexp(INF)?
  48         je      .not_finite             / if so, x is not finite
  49         cmpl    $0x400e,%ecx            / |x| < 32768 = 2^15?
  50         jb      .finite_non_special     / if so, proceed with argument reduction
  51         fldt    8(%rsp)                 / x
  52         fld1                            / 1, x
  53         jmp     1f




  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 "expl.s"
  30 
  31 #include "libm.h"
  32 LIBM_ANSI_PRAGMA_WEAK(expl,function)

  33 
  34         .data
  35         .align  16
  36 ln2_hi: .4byte  0xd1d00000, 0xb17217f7, 0x3ffe, 0x0
  37 ln2_lo: .4byte  0x4c67fc0d, 0x8654361c, 0xbfce, 0x0
  38 
  39         ENTRY(expl)
  40         movl    16(%rsp),%ecx           / cx <--sign&bexp(x)
  41         andl    $0x7fff,%ecx            / ecx <-- zero_xtnd(bexp(x))
  42         cmpl    $0x3ffe,%ecx            / Is |x| < 0.5?
  43         jb      2f                      / If so, see which shortcut to take
  44         je      .check_tail             / More checking if 0.5 <= |x| < 1
  45 .general_case:                          / Here, |x| >= 1 or x is NaN
  46         cmpl    $0x7fff,%ecx            / bexp(|x|) = bexp(INF)?
  47         je      .not_finite             / if so, x is not finite
  48         cmpl    $0x400e,%ecx            / |x| < 32768 = 2^15?
  49         jb      .finite_non_special     / if so, proceed with argument reduction
  50         fldt    8(%rsp)                 / x
  51         fld1                            / 1, x
  52         jmp     1f