Print this page
5261 libm should stop using synonyms.h
5298 fabs is 0-sized, confuses dis(1) and others
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Gordon Ross <gwr@nexenta.com>


  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 2006 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file "log10.s"
  30 
  31 #include "libm.h"
  32 LIBM_ANSI_PRAGMA_WEAK(log10,function)
  33 #include "libm_synonyms.h"
  34 #include "libm_protos.h"
  35 
  36         ENTRY(log10)
  37         fldlg2                          / log10(2)
  38         movl    8(%esp),%eax            / eax <-- hi_32(x)
  39         testl   $0x80000000,%eax
  40         jnz     .maybe_0_or_less
  41         testl   $0x7fffffff,%eax
  42         jz      .maybe_0
  43         fldl    4(%esp)                 / arg, log10(2)
  44         fyl2x                           / log10(2)*log2(arg); log10(arg)
  45         ret
  46 
  47 .maybe_0:
  48         movl    4(%esp),%ecx            / ecx <-- lo_32(x)
  49         cmpl    $0,%ecx
  50         je      .zero                   / no branch if x is +denormal
  51 .neg_nan_reentry:
  52         fldl    4(%esp)                 / arg, log10(2)
  53         fyl2x                           / log10(2)*log2(arg); log10(arg)




  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 2006 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file "log10.s"
  30 
  31 #include "libm.h"
  32 LIBM_ANSI_PRAGMA_WEAK(log10,function)

  33 #include "libm_protos.h"
  34 
  35         ENTRY(log10)
  36         fldlg2                          / log10(2)
  37         movl    8(%esp),%eax            / eax <-- hi_32(x)
  38         testl   $0x80000000,%eax
  39         jnz     .maybe_0_or_less
  40         testl   $0x7fffffff,%eax
  41         jz      .maybe_0
  42         fldl    4(%esp)                 / arg, log10(2)
  43         fyl2x                           / log10(2)*log2(arg); log10(arg)
  44         ret
  45 
  46 .maybe_0:
  47         movl    4(%esp),%ecx            / ecx <-- lo_32(x)
  48         cmpl    $0,%ecx
  49         je      .zero                   / no branch if x is +denormal
  50 .neg_nan_reentry:
  51         fldl    4(%esp)                 / arg, log10(2)
  52         fyl2x                           / log10(2)*log2(arg); log10(arg)