summaryrefslogtreecommitdiff
path: root/lib/libm/arch/i387
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-09-12 19:47:04 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-09-12 19:47:04 +0000
commit7d69051ed36ba0a26342ff530bb83aea2753de30 (patch)
treea26939a29b56a693fdb82d8fa52b8ccce5e01fe7 /lib/libm/arch/i387
parent77512715c6981f13bcde679f50a2572527367212 (diff)
Reduce libm's exports and make internal calls go direct.
All dependencies on libc are now via reserved/standardized names. ok kettenis@ millert@ deraadt@
Diffstat (limited to 'lib/libm/arch/i387')
-rw-r--r--lib/libm/arch/i387/DEFS.h29
-rw-r--r--lib/libm/arch/i387/e_acos.S3
-rw-r--r--lib/libm/arch/i387/e_asin.S5
-rw-r--r--lib/libm/arch/i387/e_atan2.S5
-rw-r--r--lib/libm/arch/i387/e_atan2f.S5
-rw-r--r--lib/libm/arch/i387/e_exp.S5
-rw-r--r--lib/libm/arch/i387/e_fmod.S3
-rw-r--r--lib/libm/arch/i387/e_log.S5
-rw-r--r--lib/libm/arch/i387/e_log10.S3
-rw-r--r--lib/libm/arch/i387/e_remainder.S5
-rw-r--r--lib/libm/arch/i387/e_remainderf.S5
-rw-r--r--lib/libm/arch/i387/e_scalb.S5
-rw-r--r--lib/libm/arch/i387/e_sqrt.S5
-rw-r--r--lib/libm/arch/i387/e_sqrtf.S5
-rw-r--r--lib/libm/arch/i387/e_sqrtl.S5
-rw-r--r--lib/libm/arch/i387/fenv.c12
-rw-r--r--lib/libm/arch/i387/s_atan.S3
-rw-r--r--lib/libm/arch/i387/s_atanf.S5
-rw-r--r--lib/libm/arch/i387/s_ceil.S5
-rw-r--r--lib/libm/arch/i387/s_ceilf.S3
-rw-r--r--lib/libm/arch/i387/s_copysign.S3
-rw-r--r--lib/libm/arch/i387/s_copysignf.S3
-rw-r--r--lib/libm/arch/i387/s_cos.S5
-rw-r--r--lib/libm/arch/i387/s_cosf.S5
-rw-r--r--lib/libm/arch/i387/s_floor.S5
-rw-r--r--lib/libm/arch/i387/s_floorf.S5
-rw-r--r--lib/libm/arch/i387/s_ilogb.S5
-rw-r--r--lib/libm/arch/i387/s_ilogbf.S5
-rw-r--r--lib/libm/arch/i387/s_llrint.S1
-rw-r--r--lib/libm/arch/i387/s_llrintf.S3
-rw-r--r--lib/libm/arch/i387/s_log1p.S5
-rw-r--r--lib/libm/arch/i387/s_log1pf.S5
-rw-r--r--lib/libm/arch/i387/s_logb.S5
-rw-r--r--lib/libm/arch/i387/s_logbf.S5
-rw-r--r--lib/libm/arch/i387/s_lrint.S1
-rw-r--r--lib/libm/arch/i387/s_lrintf.S1
-rw-r--r--lib/libm/arch/i387/s_rint.S5
-rw-r--r--lib/libm/arch/i387/s_rintf.S5
-rw-r--r--lib/libm/arch/i387/s_scalbnf.S5
-rw-r--r--lib/libm/arch/i387/s_significand.S3
-rw-r--r--lib/libm/arch/i387/s_significandf.S3
-rw-r--r--lib/libm/arch/i387/s_sin.S5
-rw-r--r--lib/libm/arch/i387/s_sinf.S5
-rw-r--r--lib/libm/arch/i387/s_tan.S3
-rw-r--r--lib/libm/arch/i387/s_tanf.S3
45 files changed, 151 insertions, 69 deletions
diff --git a/lib/libm/arch/i387/DEFS.h b/lib/libm/arch/i387/DEFS.h
new file mode 100644
index 00000000000..b892612254a
--- /dev/null
+++ b/lib/libm/arch/i387/DEFS.h
@@ -0,0 +1,29 @@
+/* $OpenBSD: DEFS.h,v 1.1 2016/09/12 19:47:02 guenther Exp $ */
+
+/*
+ * Written by Philip Guenther <guenther@openbsd.org>
+ */
+
+#include <machine/asm.h>
+
+/*
+ * We define a hidden alias with the prefix "_libm_" for each global symbol
+ * that may be used internally. By referencing _libm_x instead of x, other
+ * parts of libm prevent overriding by the application and avoid unnecessary
+ * relocations.
+ */
+#define _HIDDEN(x) _libm_##x
+#define _HIDDEN_ALIAS(x,y) \
+ STRONG_ALIAS(_HIDDEN(x),y); \
+ .hidden _HIDDEN(x)
+#define _HIDDEN_FALIAS(x,y) \
+ _HIDDEN_ALIAS(x,y); \
+ .type _HIDDEN(x),@function
+
+/*
+ * For functions implemented in ASM that are used internally
+ * END_STD(x) Like DEF_STD() in C; for standard/reserved C names
+ * END_NONSTD(x) Like DEF_NONSTD() in C; for non-ISO C names
+ */
+#define END_STD(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x))
+#define END_NONSTD(x) END_STD(x); .weak x
diff --git a/lib/libm/arch/i387/e_acos.S b/lib/libm/arch/i387/e_acos.S
index d85aaad3e26..2492b065897 100644
--- a/lib/libm/arch/i387/e_acos.S
+++ b/lib/libm/arch/i387/e_acos.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_acos.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_acos.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -17,3 +17,4 @@ ENTRY(acos)
fxch %st(1)
fpatan
ret
+END(acos)
diff --git a/lib/libm/arch/i387/e_asin.S b/lib/libm/arch/i387/e_asin.S
index bb3d0f95bfa..23200acd63e 100644
--- a/lib/libm/arch/i387/e_asin.S
+++ b/lib/libm/arch/i387/e_asin.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: e_asin.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_asin.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
/* asin = atan (x / sqrt(1 - x^2)) */
ENTRY(asin)
@@ -16,3 +16,4 @@ ENTRY(asin)
fsqrt /* sqrt (1 - x^2) */
fpatan
ret
+END_STD(asin)
diff --git a/lib/libm/arch/i387/e_atan2.S b/lib/libm/arch/i387/e_atan2.S
index 9057bd97eea..a93162fa1cf 100644
--- a/lib/libm/arch/i387/e_atan2.S
+++ b/lib/libm/arch/i387/e_atan2.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: e_atan2.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_atan2.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(atan2)
fldl 4(%esp)
fldl 12(%esp)
fpatan
ret
+END_STD(atan2)
diff --git a/lib/libm/arch/i387/e_atan2f.S b/lib/libm/arch/i387/e_atan2f.S
index 734d101c977..962952d7274 100644
--- a/lib/libm/arch/i387/e_atan2f.S
+++ b/lib/libm/arch/i387/e_atan2f.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: e_atan2f.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_atan2f.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(atan2f)
flds 4(%esp)
flds 8(%esp)
fpatan
ret
+END_STD(atan2f)
diff --git a/lib/libm/arch/i387/e_exp.S b/lib/libm/arch/i387/e_exp.S
index 2d085df48d9..d747010de8c 100644
--- a/lib/libm/arch/i387/e_exp.S
+++ b/lib/libm/arch/i387/e_exp.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_exp.S,v 1.8 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_exp.S,v 1.9 2016/09/12 19:47:02 guenther Exp $ */
/* $NetBSD: e_exp.S,v 1.12 2002/02/27 16:32:46 christos Exp $ */
/*
@@ -36,7 +36,7 @@
* J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
/* e^x = 2^(x * log2(e)) */
ENTRY(exp)
@@ -95,3 +95,4 @@ x_Inf_or_NaN:
x_not_minus_Inf:
fldl 4(%esp)
ret
+END_STD(exp)
diff --git a/lib/libm/arch/i387/e_fmod.S b/lib/libm/arch/i387/e_fmod.S
index daa1dfa34a7..e8ba4fd8f31 100644
--- a/lib/libm/arch/i387/e_fmod.S
+++ b/lib/libm/arch/i387/e_fmod.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_fmod.S,v 1.4 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_fmod.S,v 1.5 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -15,3 +15,4 @@ ENTRY(fmod)
jp 1b
fstp %st(1)
ret
+END(fmod)
diff --git a/lib/libm/arch/i387/e_log.S b/lib/libm/arch/i387/e_log.S
index 54e9423f03c..2f42d285c63 100644
--- a/lib/libm/arch/i387/e_log.S
+++ b/lib/libm/arch/i387/e_log.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: e_log.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_log.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(log)
fldln2
fldl 4(%esp)
fyl2x
ret
+END_STD(log)
diff --git a/lib/libm/arch/i387/e_log10.S b/lib/libm/arch/i387/e_log10.S
index 4045a56ee6a..d84941572a4 100644
--- a/lib/libm/arch/i387/e_log10.S
+++ b/lib/libm/arch/i387/e_log10.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_log10.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_log10.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -11,3 +11,4 @@ ENTRY(log10)
fldl 4(%esp)
fyl2x
ret
+END(log10)
diff --git a/lib/libm/arch/i387/e_remainder.S b/lib/libm/arch/i387/e_remainder.S
index a9f31df1b17..cfb397ffd52 100644
--- a/lib/libm/arch/i387/e_remainder.S
+++ b/lib/libm/arch/i387/e_remainder.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: e_remainder.S,v 1.4 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_remainder.S,v 1.5 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(remainder)
fldl 12(%esp)
@@ -15,3 +15,4 @@ ENTRY(remainder)
jp 1b
fstp %st(1)
ret
+END_STD(remainder)
diff --git a/lib/libm/arch/i387/e_remainderf.S b/lib/libm/arch/i387/e_remainderf.S
index dc92ee23dfd..5e1d5393c37 100644
--- a/lib/libm/arch/i387/e_remainderf.S
+++ b/lib/libm/arch/i387/e_remainderf.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: e_remainderf.S,v 1.4 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_remainderf.S,v 1.5 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(remainderf)
flds 8(%esp)
@@ -15,3 +15,4 @@ ENTRY(remainderf)
jp 1b
fstp %st(1)
ret
+END_STD(remainderf)
diff --git a/lib/libm/arch/i387/e_scalb.S b/lib/libm/arch/i387/e_scalb.S
index b515d76e713..e020fcf58b3 100644
--- a/lib/libm/arch/i387/e_scalb.S
+++ b/lib/libm/arch/i387/e_scalb.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: e_scalb.S,v 1.4 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_scalb.S,v 1.5 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(scalb)
fldl 12(%esp)
@@ -12,3 +12,4 @@ ENTRY(scalb)
fscale
fstp %st(1) /* bug fix for fp stack overflow */
ret
+END_NONSTD(scalb)
diff --git a/lib/libm/arch/i387/e_sqrt.S b/lib/libm/arch/i387/e_sqrt.S
index 9e9e5854679..a0dee4c96e8 100644
--- a/lib/libm/arch/i387/e_sqrt.S
+++ b/lib/libm/arch/i387/e_sqrt.S
@@ -1,12 +1,13 @@
-/* $OpenBSD: e_sqrt.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_sqrt.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(sqrt)
fldl 4(%esp)
fsqrt
ret
+END_STD(sqrt)
diff --git a/lib/libm/arch/i387/e_sqrtf.S b/lib/libm/arch/i387/e_sqrtf.S
index f6e30ef258f..e4fd3dc9440 100644
--- a/lib/libm/arch/i387/e_sqrtf.S
+++ b/lib/libm/arch/i387/e_sqrtf.S
@@ -1,12 +1,13 @@
-/* $OpenBSD: e_sqrtf.S,v 1.3 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: e_sqrtf.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(sqrtf)
flds 4(%esp)
fsqrt
ret
+END_STD(sqrtf)
diff --git a/lib/libm/arch/i387/e_sqrtl.S b/lib/libm/arch/i387/e_sqrtl.S
index d18d25f6dd6..73a18c5180e 100644
--- a/lib/libm/arch/i387/e_sqrtl.S
+++ b/lib/libm/arch/i387/e_sqrtl.S
@@ -1,12 +1,13 @@
-/* $OpenBSD: e_sqrtl.S,v 1.1 2009/11/05 20:14:32 kettenis Exp $ */
+/* $OpenBSD: e_sqrtl.S,v 1.2 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(sqrtl)
fldt 4(%esp)
fsqrt
ret
+END_STD(sqrtl)
diff --git a/lib/libm/arch/i387/fenv.c b/lib/libm/arch/i387/fenv.c
index 7e5e5e38383..eac830d5117 100644
--- a/lib/libm/arch/i387/fenv.c
+++ b/lib/libm/arch/i387/fenv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fenv.c,v 1.4 2014/04/18 15:09:52 guenther Exp $ */
+/* $OpenBSD: fenv.c,v 1.5 2016/09/12 19:47:02 guenther Exp $ */
/* $NetBSD: fenv.c,v 1.3 2010/08/01 06:34:38 taca Exp $ */
/*-
@@ -117,6 +117,7 @@ feclearexcept(int excepts)
return (0);
}
+DEF_STD(feclearexcept);
/*
* The fegetexceptflag() function stores an implementation-defined
@@ -164,6 +165,7 @@ feraiseexcept(int excepts)
return (0);
}
+DEF_STD(feraiseexcept);
/*
* This function sets the floating-point status flags indicated by the argument
@@ -198,6 +200,7 @@ fesetexceptflag(const fexcept_t *flagp, int excepts)
return (0);
}
+DEF_STD(fesetexceptflag);
/*
* The fetestexcept() function determines which of a specified subset of the
@@ -221,6 +224,7 @@ fetestexcept(int excepts)
return ((status | mxcsr) & excepts);
}
+DEF_STD(fetestexcept);
/*
* The fegetround() function gets the current rounding direction.
@@ -240,6 +244,7 @@ fegetround(void)
return (control & _X87_ROUND_MASK);
}
+DEF_STD(fegetround);
/*
* The fesetround() function establishes the rounding direction represented by
@@ -276,6 +281,7 @@ fesetround(int round)
return (0);
}
+DEF_STD(fesetround);
/*
* The fegetenv() function attempts to store the current floating-point
@@ -303,6 +309,7 @@ fegetenv(fenv_t *envp)
return (0);
}
+DEF_STD(fegetenv);
/*
* The feholdexcept() function saves the current floating-point environment
@@ -338,6 +345,7 @@ feholdexcept(fenv_t *envp)
return (0);
}
+DEF_STD(feholdexcept);
/*
* The fesetenv() function attempts to establish the floating-point environment
@@ -359,6 +367,7 @@ fesetenv(const fenv_t *envp)
return (0);
}
+DEF_STD(fesetenv);
/*
* The feupdateenv() function saves the currently raised floating-point
@@ -389,6 +398,7 @@ feupdateenv(const fenv_t *envp)
return (0);
}
+DEF_STD(feupdateenv);
/*
* The following functions are extentions to the standard
diff --git a/lib/libm/arch/i387/s_atan.S b/lib/libm/arch/i387/s_atan.S
index 610f21683be..fdf3f8a15b8 100644
--- a/lib/libm/arch/i387/s_atan.S
+++ b/lib/libm/arch/i387/s_atan.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_atan.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_atan.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -11,3 +11,4 @@ ENTRY(atan)
fld1
fpatan
ret
+END(atan)
diff --git a/lib/libm/arch/i387/s_atanf.S b/lib/libm/arch/i387/s_atanf.S
index f4c9212cf1b..d63c3705520 100644
--- a/lib/libm/arch/i387/s_atanf.S
+++ b/lib/libm/arch/i387/s_atanf.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: s_atanf.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_atanf.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(atanf)
flds 4(%esp)
fld1
fpatan
ret
+END_STD(atanf)
diff --git a/lib/libm/arch/i387/s_ceil.S b/lib/libm/arch/i387/s_ceil.S
index 52aa9224f19..235ddd5673b 100644
--- a/lib/libm/arch/i387/s_ceil.S
+++ b/lib/libm/arch/i387/s_ceil.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_ceil.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_ceil.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(ceil)
subl $8,%esp
@@ -23,3 +23,4 @@ ENTRY(ceil)
addl $8,%esp
ret
+END_STD(ceil)
diff --git a/lib/libm/arch/i387/s_ceilf.S b/lib/libm/arch/i387/s_ceilf.S
index a8018f97146..7e19af6adb0 100644
--- a/lib/libm/arch/i387/s_ceilf.S
+++ b/lib/libm/arch/i387/s_ceilf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_ceilf.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_ceilf.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -23,3 +23,4 @@ ENTRY(ceilf)
addl $8,%esp
ret
+END(ceilf)
diff --git a/lib/libm/arch/i387/s_copysign.S b/lib/libm/arch/i387/s_copysign.S
index eeb1627626f..91f027c1646 100644
--- a/lib/libm/arch/i387/s_copysign.S
+++ b/lib/libm/arch/i387/s_copysign.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_copysign.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_copysign.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -15,3 +15,4 @@ ENTRY(copysign)
movl %eax,8(%esp)
fldl 4(%esp)
ret
+END(copysign)
diff --git a/lib/libm/arch/i387/s_copysignf.S b/lib/libm/arch/i387/s_copysignf.S
index ecd2dfa1137..c9d2186274e 100644
--- a/lib/libm/arch/i387/s_copysignf.S
+++ b/lib/libm/arch/i387/s_copysignf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_copysignf.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_copysignf.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -15,3 +15,4 @@ ENTRY(copysignf)
movl %eax,4(%esp)
flds 4(%esp)
ret
+END(copysignf)
diff --git a/lib/libm/arch/i387/s_cos.S b/lib/libm/arch/i387/s_cos.S
index a336e43cd78..cd22d5d2770 100644
--- a/lib/libm/arch/i387/s_cos.S
+++ b/lib/libm/arch/i387/s_cos.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_cos.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_cos.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(cos)
fldl 4(%esp)
@@ -23,3 +23,4 @@ ENTRY(cos)
fstp %st(1)
fcos
ret
+END_STD(cos)
diff --git a/lib/libm/arch/i387/s_cosf.S b/lib/libm/arch/i387/s_cosf.S
index 29ed8b4637f..e68621965a2 100644
--- a/lib/libm/arch/i387/s_cosf.S
+++ b/lib/libm/arch/i387/s_cosf.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: s_cosf.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_cosf.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
/* A float's domain isn't large enough to require argument reduction. */
ENTRY(cosf)
flds 4(%esp)
fcos
ret
+END_STD(cosf)
diff --git a/lib/libm/arch/i387/s_floor.S b/lib/libm/arch/i387/s_floor.S
index df6158fa433..40453132178 100644
--- a/lib/libm/arch/i387/s_floor.S
+++ b/lib/libm/arch/i387/s_floor.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_floor.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_floor.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(floor)
subl $8,%esp
@@ -23,3 +23,4 @@ ENTRY(floor)
addl $8,%esp
ret
+END_STD(floor)
diff --git a/lib/libm/arch/i387/s_floorf.S b/lib/libm/arch/i387/s_floorf.S
index 73715860356..ee02d2be4e7 100644
--- a/lib/libm/arch/i387/s_floorf.S
+++ b/lib/libm/arch/i387/s_floorf.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_floorf.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_floorf.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(floorf)
subl $8,%esp
@@ -23,3 +23,4 @@ ENTRY(floorf)
addl $8,%esp
ret
+END_STD(floorf)
diff --git a/lib/libm/arch/i387/s_ilogb.S b/lib/libm/arch/i387/s_ilogb.S
index 3a2368d1dbc..7400ebc2b84 100644
--- a/lib/libm/arch/i387/s_ilogb.S
+++ b/lib/libm/arch/i387/s_ilogb.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_ilogb.S,v 1.5 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_ilogb.S,v 1.6 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(ilogb)
pushl %ebp
@@ -20,3 +20,4 @@ ENTRY(ilogb)
leave
ret
+END_STD(ilogb)
diff --git a/lib/libm/arch/i387/s_ilogbf.S b/lib/libm/arch/i387/s_ilogbf.S
index 68a00b079a6..c7fd4606ad6 100644
--- a/lib/libm/arch/i387/s_ilogbf.S
+++ b/lib/libm/arch/i387/s_ilogbf.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_ilogbf.S,v 1.5 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_ilogbf.S,v 1.6 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(ilogbf)
pushl %ebp
@@ -20,3 +20,4 @@ ENTRY(ilogbf)
leave
ret
+END_STD(ilogbf)
diff --git a/lib/libm/arch/i387/s_llrint.S b/lib/libm/arch/i387/s_llrint.S
index 6a801834b0c..0e754830303 100644
--- a/lib/libm/arch/i387/s_llrint.S
+++ b/lib/libm/arch/i387/s_llrint.S
@@ -33,3 +33,4 @@ ENTRY(llrint)
popl %eax
popl %edx
ret
+END(llrint)
diff --git a/lib/libm/arch/i387/s_llrintf.S b/lib/libm/arch/i387/s_llrintf.S
index 7d3e9500150..4c21839e332 100644
--- a/lib/libm/arch/i387/s_llrintf.S
+++ b/lib/libm/arch/i387/s_llrintf.S
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(llrintf)
flds 4(%esp)
@@ -33,3 +33,4 @@ ENTRY(llrintf)
popl %eax
popl %edx
ret
+END_STD(llrintf)
diff --git a/lib/libm/arch/i387/s_log1p.S b/lib/libm/arch/i387/s_log1p.S
index 78c3bb69eb9..e8467b1127f 100644
--- a/lib/libm/arch/i387/s_log1p.S
+++ b/lib/libm/arch/i387/s_log1p.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_log1p.S,v 1.4 2009/04/08 23:31:34 martynas Exp $ */
+/* $OpenBSD: s_log1p.S,v 1.5 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@NetBSD.org>.
* Public domain.
@@ -9,7 +9,7 @@
* Still public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
/*
* The log1p() function is provided to compute an accurate value of
@@ -66,3 +66,4 @@ use_fyl2xp1:
fldl 4(%esp)
fyl2xp1
ret
+END_STD(log1p)
diff --git a/lib/libm/arch/i387/s_log1pf.S b/lib/libm/arch/i387/s_log1pf.S
index 67662ab37bb..3f6ac2942d8 100644
--- a/lib/libm/arch/i387/s_log1pf.S
+++ b/lib/libm/arch/i387/s_log1pf.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_log1pf.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_log1pf.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
/*
* Since the fyl2xp1 instruction has such a limited range:
@@ -19,3 +19,4 @@ ENTRY(log1pf)
faddp
fyl2x
ret
+END_STD(log1pf)
diff --git a/lib/libm/arch/i387/s_logb.S b/lib/libm/arch/i387/s_logb.S
index 71bd7dab3f6..9edd26bc91d 100644
--- a/lib/libm/arch/i387/s_logb.S
+++ b/lib/libm/arch/i387/s_logb.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: s_logb.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_logb.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(logb)
fldl 4(%esp)
fxtract
fstp %st
ret
+END_STD(logb)
diff --git a/lib/libm/arch/i387/s_logbf.S b/lib/libm/arch/i387/s_logbf.S
index cec270329ec..b83e4744e15 100644
--- a/lib/libm/arch/i387/s_logbf.S
+++ b/lib/libm/arch/i387/s_logbf.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: s_logbf.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_logbf.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(logbf)
flds 4(%esp)
fxtract
fstp %st
ret
+END_STD(logbf)
diff --git a/lib/libm/arch/i387/s_lrint.S b/lib/libm/arch/i387/s_lrint.S
index fb43e6b57fb..848f6d2cbb1 100644
--- a/lib/libm/arch/i387/s_lrint.S
+++ b/lib/libm/arch/i387/s_lrint.S
@@ -32,3 +32,4 @@ ENTRY(lrint)
fistpl (%esp)
popl %eax
ret
+END(lrint)
diff --git a/lib/libm/arch/i387/s_lrintf.S b/lib/libm/arch/i387/s_lrintf.S
index 07e1ff4d2af..329bb3c61d9 100644
--- a/lib/libm/arch/i387/s_lrintf.S
+++ b/lib/libm/arch/i387/s_lrintf.S
@@ -32,3 +32,4 @@ ENTRY(lrintf)
fistpl (%esp)
popl %eax
ret
+END(lrintf)
diff --git a/lib/libm/arch/i387/s_rint.S b/lib/libm/arch/i387/s_rint.S
index 6a17267f944..a5606325fa3 100644
--- a/lib/libm/arch/i387/s_rint.S
+++ b/lib/libm/arch/i387/s_rint.S
@@ -1,12 +1,13 @@
-/* $OpenBSD: s_rint.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_rint.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(rint)
fldl 4(%esp)
frndint
ret
+END_STD(rint)
diff --git a/lib/libm/arch/i387/s_rintf.S b/lib/libm/arch/i387/s_rintf.S
index 56d1c852431..f6439fd4860 100644
--- a/lib/libm/arch/i387/s_rintf.S
+++ b/lib/libm/arch/i387/s_rintf.S
@@ -1,12 +1,13 @@
-/* $OpenBSD: s_rintf.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_rintf.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(rintf)
flds 4(%esp)
frndint
ret
+END_STD(rintf)
diff --git a/lib/libm/arch/i387/s_scalbnf.S b/lib/libm/arch/i387/s_scalbnf.S
index fe602460956..01191a5f770 100644
--- a/lib/libm/arch/i387/s_scalbnf.S
+++ b/lib/libm/arch/i387/s_scalbnf.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_scalbnf.S,v 1.4 2009/04/21 23:02:23 martynas Exp $ */
+/* $OpenBSD: s_scalbnf.S,v 1.5 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
.global ldexpf
ldexpf = scalbnf
@@ -15,3 +15,4 @@ ENTRY(scalbnf)
fscale
fstp %st(1) /* bug fix for fp stack overflow */
ret
+END_STD(scalbnf)
diff --git a/lib/libm/arch/i387/s_significand.S b/lib/libm/arch/i387/s_significand.S
index a4246a7912f..c24291ff421 100644
--- a/lib/libm/arch/i387/s_significand.S
+++ b/lib/libm/arch/i387/s_significand.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_significand.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_significand.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -11,3 +11,4 @@ ENTRY(significand)
fxtract
fstp %st(1)
ret
+END(significand)
diff --git a/lib/libm/arch/i387/s_significandf.S b/lib/libm/arch/i387/s_significandf.S
index 6159621322b..dd851075670 100644
--- a/lib/libm/arch/i387/s_significandf.S
+++ b/lib/libm/arch/i387/s_significandf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_significandf.S,v 1.3 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_significandf.S,v 1.4 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -11,3 +11,4 @@ ENTRY(significandf)
fxtract
fstp %st(1)
ret
+END(significandf)
diff --git a/lib/libm/arch/i387/s_sin.S b/lib/libm/arch/i387/s_sin.S
index 82956f653a5..f0f7cc3c219 100644
--- a/lib/libm/arch/i387/s_sin.S
+++ b/lib/libm/arch/i387/s_sin.S
@@ -1,10 +1,10 @@
-/* $OpenBSD: s_sin.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_sin.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
ENTRY(sin)
fldl 4(%esp)
@@ -23,3 +23,4 @@ ENTRY(sin)
fstp %st(1)
fsin
ret
+END_STD(sin)
diff --git a/lib/libm/arch/i387/s_sinf.S b/lib/libm/arch/i387/s_sinf.S
index 61a2e936659..8f4641aa9d7 100644
--- a/lib/libm/arch/i387/s_sinf.S
+++ b/lib/libm/arch/i387/s_sinf.S
@@ -1,13 +1,14 @@
-/* $OpenBSD: s_sinf.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_sinf.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
-#include <machine/asm.h>
+#include "DEFS.h"
/* A float's domain isn't large enough to require argument reduction. */
ENTRY(sinf)
flds 4(%esp)
fsin
ret
+END_STD(sinf)
diff --git a/lib/libm/arch/i387/s_tan.S b/lib/libm/arch/i387/s_tan.S
index d3f683777fa..eaa2a92d6d4 100644
--- a/lib/libm/arch/i387/s_tan.S
+++ b/lib/libm/arch/i387/s_tan.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_tan.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_tan.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -25,3 +25,4 @@ ENTRY(tan)
fptan
fstp %st(0)
ret
+END(tan)
diff --git a/lib/libm/arch/i387/s_tanf.S b/lib/libm/arch/i387/s_tanf.S
index 0ee490c14e7..bad716c4809 100644
--- a/lib/libm/arch/i387/s_tanf.S
+++ b/lib/libm/arch/i387/s_tanf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_tanf.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
+/* $OpenBSD: s_tanf.S,v 1.3 2016/09/12 19:47:02 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -12,3 +12,4 @@ ENTRY(tanf)
fptan
fstp %st(0)
ret
+END(tanf)