Print this page
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local
@@ -25,18 +25,16 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#if defined(ELFOBJ)
#pragma weak ilogbf = __ilogbf
-#endif
#include "libm.h"
#include "xpg6.h" /* __xpg6 */
-#if defined(USE_FPSCALE) || defined(__x86)
+#if defined(__x86)
static const float two25 = 33554432.0F;
#else
/*
* v: a non-zero subnormal |x|
*/
@@ -51,11 +49,11 @@
if (v & 0xf0)
r += 4, v >>= 4;
v <<= 1;
return (r + ((0xffffaa50 >> v) & 0x3));
}
-#endif /* defined(USE_FPSCALE) */
+#endif /* defined(__x86) */
static int
raise_invalid(int v) { /* SUSv3 requires ilogbf(0,+/-Inf,NaN) raise invalid */
#ifndef lint
if ((__xpg6 & _C99SUSv3_ilogb_0InfNaN_raises_invalid) != 0) {
@@ -74,11 +72,11 @@
if (k < 0x00800000) {
if (k == 0)
return (raise_invalid(0x80000001));
else {
-#if defined(USE_FPSCALE) || defined(__x86)
+#if defined(__x86)
x *= two25;
return (((*((int *) &x) & 0x7f800000) >> 23) - 152);
#else
return (ilogbf_subnormal(k));
#endif