Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm -build ldexp/frexp/modf locally again rather than r...
details: https://anonhg.NetBSD.org/src/rev/12a72ae11359
branches: trunk
changeset: 754213:12a72ae11359
user: drochner <drochner%NetBSD.org@localhost>
date: Fri Apr 23 19:17:07 2010 +0000
description:
-build ldexp/frexp/modf locally again rather than relying on libc
reaching over, to get things into a sane state,
-do the usual namespace protection game with scalbn(f) because it
is used internally
(more symbol renamings are necessary)
The weak_alias change for mc68881 is untested.
diffstat:
lib/libm/Makefile | 12 ++----------
lib/libm/arch/i387/s_scalbn.S | 8 ++++++--
lib/libm/arch/i387/s_scalbnf.S | 8 ++++++--
lib/libm/arch/mc68881/s_scalbn.S | 10 +++++++---
lib/libm/src/e_pow.c | 3 ++-
lib/libm/src/e_powf.c | 3 ++-
lib/libm/src/e_scalb.c | 3 ++-
lib/libm/src/e_scalbf.c | 3 ++-
lib/libm/src/k_rem_pio2.c | 3 ++-
lib/libm/src/k_rem_pio2f.c | 3 ++-
lib/libm/src/namespace.h | 7 ++++++-
lib/libm/src/s_ldexp.c | 3 ++-
lib/libm/src/s_ldexpf.c | 3 ++-
lib/libm/src/s_scalbn.c | 7 ++++++-
lib/libm/src/s_scalbnf.c | 7 ++++++-
15 files changed, 55 insertions(+), 28 deletions(-)
diffs (truncated from 302 to 300 lines):
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/Makefile
--- a/lib/libm/Makefile Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/Makefile Fri Apr 23 19:17:07 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.93 2010/03/29 06:59:42 mrg Exp $
+# $NetBSD: Makefile,v 1.94 2010/04/23 19:17:07 drochner Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@@ -137,17 +137,9 @@
w_pow.c w_powf.c w_remainder.c w_remainderf.c w_scalb.c w_scalbf.c \
w_sinh.c w_sinhf.c w_sqrt.c w_sqrtf.c \
lrint.c lrintf.c llrint.c llrintf.c lround.c lroundf.c llround.c \
- llroundf.c \
+ llroundf.c s_frexp.c s_ldexp.c s_modf.c \
s_fmax.c s_fmaxf.c s_fmaxl.c s_fmin.c s_fminf.c s_fminl.c s_fdim.c
-#
-# Add these for machines which don't have compatibility functions in libc,
-# since they appeared later than they became libc compatibility.
-#
-.if (${MACHINE_ARCH} == "powerpc64")
-COMMON_SRCS += s_frexp.c s_ldexp.c s_modf.c
-.endif
-
.PATH: ${.CURDIR}/compat
COMMON_SRCS+= compat_cabs.c compat_cabsf.c
# XXX our compatibility cabs() is different!
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/arch/i387/s_scalbn.S
--- a/lib/libm/arch/i387/s_scalbn.S Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/arch/i387/s_scalbn.S Fri Apr 23 19:17:07 2010 +0000
@@ -5,9 +5,13 @@
#include <machine/asm.h>
-RCSID("$NetBSD: s_scalbn.S,v 1.8 2006/03/21 11:35:21 drochner Exp $")
+RCSID("$NetBSD: s_scalbn.S,v 1.9 2010/04/23 19:17:07 drochner Exp $")
-ENTRY(scalbn)
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(scalbn,_scalbn)
+#endif
+
+ENTRY(_scalbn)
#ifdef __x86_64__
movl %edi,-12(%rsp)
fildl -12(%rsp)
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/arch/i387/s_scalbnf.S
--- a/lib/libm/arch/i387/s_scalbnf.S Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/arch/i387/s_scalbnf.S Fri Apr 23 19:17:07 2010 +0000
@@ -5,9 +5,13 @@
#include <machine/asm.h>
-RCSID("$NetBSD: s_scalbnf.S,v 1.7 2006/03/21 11:35:21 drochner Exp $")
+RCSID("$NetBSD: s_scalbnf.S,v 1.8 2010/04/23 19:17:07 drochner Exp $")
-ENTRY(scalbnf)
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(scalbnf,_scalbnf)
+#endif
+
+ENTRY(_scalbnf)
#ifdef __x86_64__
movl %edi,-8(%rsp)
fildl -8(%rsp)
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/arch/mc68881/s_scalbn.S
--- a/lib/libm/arch/mc68881/s_scalbn.S Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/arch/mc68881/s_scalbn.S Fri Apr 23 19:17:07 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: s_scalbn.S,v 1.7 2003/08/07 16:44:43 agc Exp $ */
+/* $NetBSD: s_scalbn.S,v 1.8 2010/04/23 19:17:07 drochner Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,11 +38,15 @@
;_sccsid:
;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90"
-RCSID("$NetBSD: s_scalbn.S,v 1.7 2003/08/07 16:44:43 agc Exp $")
+RCSID("$NetBSD: s_scalbn.S,v 1.8 2010/04/23 19:17:07 drochner Exp $")
+
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(scalbn,_scalbn)
+#endif
| scalbn(x, N)
| returns x * (2**N), for integer values N.
-ENTRY(scalbn)
+ENTRY(_scalbn)
fmoved %sp@(4),%fp0
fscalel %sp@(12),%fp0
#ifndef __SVR4_ABI__
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/e_pow.c
--- a/lib/libm/src/e_pow.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/e_pow.c Fri Apr 23 19:17:07 2010 +0000
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_pow.c,v 1.15 2009/01/19 06:41:13 lukem Exp $");
+__RCSID("$NetBSD: e_pow.c,v 1.16 2010/04/23 19:17:07 drochner Exp $");
#endif
/* __ieee754_pow(x,y) return x**y
@@ -60,6 +60,7 @@
* to produce the hexadecimal values shown.
*/
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/e_powf.c
--- a/lib/libm/src/e_powf.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/e_powf.c Fri Apr 23 19:17:07 2010 +0000
@@ -15,9 +15,10 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_powf.c,v 1.14 2009/01/19 05:59:06 lukem Exp $");
+__RCSID("$NetBSD: e_powf.c,v 1.15 2010/04/23 19:17:07 drochner Exp $");
#endif
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/e_scalb.c
--- a/lib/libm/src/e_scalb.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/e_scalb.c Fri Apr 23 19:17:07 2010 +0000
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_scalb.c,v 1.9 2002/05/26 22:01:52 wiz Exp $");
+__RCSID("$NetBSD: e_scalb.c,v 1.10 2010/04/23 19:17:07 drochner Exp $");
#endif
/*
@@ -21,6 +21,7 @@
* should use scalbn() instead.
*/
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/e_scalbf.c
--- a/lib/libm/src/e_scalbf.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/e_scalbf.c Fri Apr 23 19:17:07 2010 +0000
@@ -15,9 +15,10 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_scalbf.c,v 1.6 2002/05/26 22:01:52 wiz Exp $");
+__RCSID("$NetBSD: e_scalbf.c,v 1.7 2010/04/23 19:17:07 drochner Exp $");
#endif
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/k_rem_pio2.c
--- a/lib/libm/src/k_rem_pio2.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/k_rem_pio2.c Fri Apr 23 19:17:07 2010 +0000
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_rem_pio2.c,v 1.11 2003/01/04 23:43:03 wiz Exp $");
+__RCSID("$NetBSD: k_rem_pio2.c,v 1.12 2010/04/23 19:17:07 drochner Exp $");
#endif
/*
@@ -131,6 +131,7 @@
* to produce the hexadecimal values shown.
*/
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/k_rem_pio2f.c
--- a/lib/libm/src/k_rem_pio2f.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/k_rem_pio2f.c Fri Apr 23 19:17:07 2010 +0000
@@ -15,9 +15,10 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_rem_pio2f.c,v 1.7 2002/05/26 22:01:53 wiz Exp $");
+__RCSID("$NetBSD: k_rem_pio2f.c,v 1.8 2010/04/23 19:17:07 drochner Exp $");
#endif
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/namespace.h
--- a/lib/libm/src/namespace.h Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/namespace.h Fri Apr 23 19:17:07 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.2 2007/08/20 16:01:39 drochner Exp $ */
+/* $NetBSD: namespace.h,v 1.3 2010/04/23 19:17:07 drochner Exp $ */
#define atan2 _atan2
#define atan2f _atan2f
@@ -15,6 +15,8 @@
#define sinf _sinf
#define cos _cos
#define cosf _cosf
+#define finite _finite
+#define finitef _finitef
#endif /* notyet */
#define sinh _sinh
#define sinhf _sinhf
@@ -27,3 +29,6 @@
#define casinf _casinf
#define catan _catan
#define catanf _catanf
+
+#define scalbn _scalbn
+#define scalbnf _scalbnf
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/s_ldexp.c
--- a/lib/libm/src/s_ldexp.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/s_ldexp.c Fri Apr 23 19:17:07 2010 +0000
@@ -12,9 +12,10 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_ldexp.c,v 1.10 2008/04/25 22:21:53 christos Exp $");
+__RCSID("$NetBSD: s_ldexp.c,v 1.11 2010/04/23 19:17:07 drochner Exp $");
#endif
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
#include <errno.h>
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/s_ldexpf.c
--- a/lib/libm/src/s_ldexpf.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/s_ldexpf.c Fri Apr 23 19:17:07 2010 +0000
@@ -15,9 +15,10 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_ldexpf.c,v 1.7 2008/04/25 22:21:53 christos Exp $");
+__RCSID("$NetBSD: s_ldexpf.c,v 1.8 2010/04/23 19:17:07 drochner Exp $");
#endif
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
#include <errno.h>
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/s_scalbn.c
--- a/lib/libm/src/s_scalbn.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/s_scalbn.c Fri Apr 23 19:17:07 2010 +0000
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_scalbn.c,v 1.13 2008/09/28 18:54:55 christos Exp $");
+__RCSID("$NetBSD: s_scalbn.c,v 1.14 2010/04/23 19:17:07 drochner Exp $");
#endif
/*
@@ -22,9 +22,14 @@
* exponentiation or a multiplication.
*/
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
+#ifdef __weak_alias
+__weak_alias(scalbn, _scalbn)
+#endif
+
static const double
two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */
diff -r 376c51eb20d7 -r 12a72ae11359 lib/libm/src/s_scalbnf.c
--- a/lib/libm/src/s_scalbnf.c Fri Apr 23 19:09:15 2010 +0000
+++ b/lib/libm/src/s_scalbnf.c Fri Apr 23 19:17:07 2010 +0000
@@ -15,12 +15,17 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_scalbnf.c,v 1.8 2002/05/26 22:01:58 wiz Exp $");
+__RCSID("$NetBSD: s_scalbnf.c,v 1.9 2010/04/23 19:17:07 drochner Exp $");
#endif
+#include "namespace.h"
#include "math.h"
#include "math_private.h"
+#ifdef __weak_alias
+__weak_alias(scalbnf, _scalbnf)
+#endif
+
static const float
Home |
Main Index |
Thread Index |
Old Index