Print this page
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local


  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  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 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #if defined(ELFOBJ)
  31 #pragma weak ilogbl = __ilogbl
  32 #endif
  33 
  34 #include "libm.h"
  35 #include "xpg6.h"       /* __xpg6 */
  36 
  37 #if defined(__sparc)
  38 #define ISNORMALL(k, x) (k != 0x7fff)                   /* assuming k != 0 */
  39 #define X86PDNRM(k, x)
  40 #define XSCALE_OFFSET   0x406f                          /* 0x3fff + 112 */
  41 static const long double xscale = 5192296858534827628530496329220096.0L;
  42                                                                 /* 2^112 */
  43 #elif defined(__x86)
  44 /*
  45  * if pseudo-denormal, replace by the equivalent normal
  46  */
  47 #define X86PDNRM(k, x)  if (k == 0 && (((int *) &x)[1] & 0x80000000) != 0) \
  48                                 ((int *) &x)[2] |= k = 1
  49 #if defined(HANDLE_UNSUPPORTED)                         /* assuming k != 0 */
  50 #define ISNORMALL(k, x) (k != 0x7fff && (((int *) &x)[1] & 0x80000000) != 0)
  51 #else
  52 #define ISNORMALL(k, x) (k != 0x7fff)




  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  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 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 

  30 #pragma weak ilogbl = __ilogbl

  31 
  32 #include "libm.h"
  33 #include "xpg6.h"       /* __xpg6 */
  34 
  35 #if defined(__sparc)
  36 #define ISNORMALL(k, x) (k != 0x7fff)                   /* assuming k != 0 */
  37 #define X86PDNRM(k, x)
  38 #define XSCALE_OFFSET   0x406f                          /* 0x3fff + 112 */
  39 static const long double xscale = 5192296858534827628530496329220096.0L;
  40                                                                 /* 2^112 */
  41 #elif defined(__x86)
  42 /*
  43  * if pseudo-denormal, replace by the equivalent normal
  44  */
  45 #define X86PDNRM(k, x)  if (k == 0 && (((int *) &x)[1] & 0x80000000) != 0) \
  46                                 ((int *) &x)[2] |= k = 1
  47 #if defined(HANDLE_UNSUPPORTED)                         /* assuming k != 0 */
  48 #define ISNORMALL(k, x) (k != 0x7fff && (((int *) &x)[1] & 0x80000000) != 0)
  49 #else
  50 #define ISNORMALL(k, x) (k != 0x7fff)