Index: unk/src/emx/src/lib/math/386/acos.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/acos.s	(revision 2014)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/ acos.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(acosl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double acos (double x)
-
-/ acos(x) = atan2 (sqrt (1-x*x), x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fld     %st
-        fmulp
-        fsubrl  __const_ONE
-        fsqrt
-        FLD     x                       /* x */
-        fpatan
-        _xam
-        j_nan   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/acosl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/acosl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/acosl.s	(revision 2015)
@@ -0,0 +1,35 @@
+/ acos.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(acosl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double acos (double x)
+
+/ acos(x) = atan2 (sqrt (1-x*x), x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fld     %st
+        fmulp
+        fsubrl  __const_ONE
+        fsqrt
+        FLD     x                       /* x */
+        fpatan
+        _xam
+        j_nan   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($EDOM)
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/asin.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/asin.s	(revision 2014)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/ asin.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(asinl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double asin (double x)
-
-/ asin(x) = atan (x / sqrt (1-x*x))
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fld     %st
-        fld     %st
-        fmulp
-        fsubrl  __const_ONE
-        fsqrt
-        fdivrp
-        fldl    __const_ONE
-        fpatan
-        _xam
-        j_nan   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/asinl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/asinl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/asinl.s	(revision 2015)
@@ -0,0 +1,37 @@
+/ asin.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(asinl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double asin (double x)
+
+/ asin(x) = atan (x / sqrt (1-x*x))
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fld     %st
+        fld     %st
+        fmulp
+        fsubrl  __const_ONE
+        fsqrt
+        fdivrp
+        fldl    __const_ONE
+        fpatan
+        _xam
+        j_nan   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($EDOM)
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/atan.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/atan.s	(revision 2014)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/ atan.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(atanl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double atan (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fldl    __const_ONE
-        fpatan
-        EPILOGUE(FUNC)
Index: unk/src/emx/src/lib/math/386/atan2.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/atan2.s	(revision 2014)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/ atan2.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(atan2l)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double atan2 (double y, double x)
-
-#define y        4(%esp)
-#if defined (LONG_DOUBLE)
-#define x       16(%esp)
-#else
-#define x       12(%esp)
-#endif
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     y                       /* y */
-        FLD     x                       /* x */
-        fpatan
-        EPILOGUE(FUNC)
Index: /trunk/src/emx/src/lib/math/386/atan2l.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/atan2l.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/atan2l.s	(revision 2015)
@@ -0,0 +1,28 @@
+/ atan2.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(atan2l)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double atan2 (double y, double x)
+
+#define y        4(%esp)
+#if defined (LONG_DOUBLE)
+#define x       16(%esp)
+#else
+#define x       12(%esp)
+#endif
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     y                       /* y */
+        FLD     x                       /* x */
+        fpatan
+        EPILOGUE(FUNC)
Index: /trunk/src/emx/src/lib/math/386/atanl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/atanl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/atanl.s	(revision 2015)
@@ -0,0 +1,23 @@
+/ atan.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(atanl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double atan (double x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fldl    __const_ONE
+        fpatan
+        EPILOGUE(FUNC)
Index: unk/src/emx/src/lib/math/386/cos.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/cos.s	(revision 2014)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/ cos.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
-/                    Modified 1993-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(cosl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double cos (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fcos                            /* cos(x) */
-        fstsw   %ax
-        testb   $0x04, %ah
-        jnz     Llarge                  /* C2 != 0 ? */
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Llarge: fldl    __const_ONE             /* cos(large):=1 */
-        fstp    %st(1)
-        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/cosh.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/cosh.s	(revision 2014)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/ cosh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(coshl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double cosh (double x)
-
-#define cw1      0(%esp)
-#define cw2      2(%esp)
-/define ret_addr 4(%esp)
-#define x        8(%esp)
-
-/ cosh(x) = 0.5 * (exp(x) + exp(-x)) = 0.5 * (exp(x) + 1/exp(-x))
-
-FUNC:
-        PROFILE_NOFRAME
-        subl    $4, %esp                /* space for control words */
-        FLD     x                       /* x */
-        fldl2e                          /* log2 (e) */
-        fmulp                           /* y := x * log2 (e) */
-        fstcw   cw1
-        movw    cw1, %ax
-        andw    $0xf3ff, %ax
-        orw     $0x0400, %ax            /* round down towards -inf */
-        movw    %ax, cw2
-        fldcw   cw2
-        fld     %st                     /* y, y */
-        frndint                         /* int (y), y */
-        fldcw   cw1
-        fxch    %st(1)                  /* y, int (y) */
-        fsub    %st(1), %st             /* frac (y), int (y) */
-        f2xm1                           /* 2^frac (y) - 1, int (y) */
-        faddl   __const_ONE             /* 2^frac (y), int (y) */
-        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
-        fst     %st(1)                  /* exp(x), exp(x) */
-        fdivrl  __const_ONE             /* exp(-x), exp(x) */
-        faddp                           /* exp(x) + exp(-x) */
-        fmull   __const_HALF            /* 0.5 * (exp(x) + exp(-x)) */
-        CONV(x)                         /* convert to double */
-        addl    $4, %esp                /* Remove control words */
-        _xam
-        j_inf   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($ERANGE)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/coshl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/coshl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/coshl.s	(revision 2015)
@@ -0,0 +1,55 @@
+/ cosh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(coshl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double cosh (double x)
+
+#define cw1      0(%esp)
+#define cw2      2(%esp)
+/define ret_addr 4(%esp)
+#define x        8(%esp)
+
+/ cosh(x) = 0.5 * (exp(x) + exp(-x)) = 0.5 * (exp(x) + 1/exp(-x))
+
+FUNC:
+        PROFILE_NOFRAME
+        subl    $4, %esp                /* space for control words */
+        FLD     x                       /* x */
+        fldl2e                          /* log2 (e) */
+        fmulp                           /* y := x * log2 (e) */
+        fstcw   cw1
+        movw    cw1, %ax
+        andw    $0xf3ff, %ax
+        orw     $0x0400, %ax            /* round down towards -inf */
+        movw    %ax, cw2
+        fldcw   cw2
+        fld     %st                     /* y, y */
+        frndint                         /* int (y), y */
+        fldcw   cw1
+        fxch    %st(1)                  /* y, int (y) */
+        fsub    %st(1), %st             /* frac (y), int (y) */
+        f2xm1                           /* 2^frac (y) - 1, int (y) */
+        faddl   __const_ONE             /* 2^frac (y), int (y) */
+        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
+        fst     %st(1)                  /* exp(x), exp(x) */
+        fdivrl  __const_ONE             /* exp(-x), exp(x) */
+        faddp                           /* exp(x) + exp(-x) */
+        fmull   __const_HALF            /* 0.5 * (exp(x) + exp(-x)) */
+        CONV(x)                         /* convert to double */
+        addl    $4, %esp                /* Remove control words */
+        _xam
+        j_inf   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($ERANGE)
+        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/cosl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/cosl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/cosl.s	(revision 2015)
@@ -0,0 +1,31 @@
+/ cos.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
+/                    Modified 1993-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(cosl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double cos (double x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fcos                            /* cos(x) */
+        fstsw   %ax
+        testb   $0x04, %ah
+        jnz     Llarge                  /* C2 != 0 ? */
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Llarge: fldl    __const_ONE             /* cos(large):=1 */
+        fstp    %st(1)
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/exp.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/exp.s	(revision 2014)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/ exp.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(expl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double exp (double x)
-
-#define cw1      0(%esp)
-#define cw2      2(%esp)
-/define ret_addr 4(%esp)
-#define x        8(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        subl    $4, %esp                /* space for control words */
-        FLD     x                       /* x */
-        fxam
-        fstsw  %ax
-        andb    $0x47, %ah
-        cmpb    $5, %ah
-        je      Lreturn                 /* x = +INF => return x */
-        cmpb    $7, %ah
-        je      Lminf                   /* x = -INF => return 0 */
-        fldl2e                          /* log2 (e) */
-        fmulp                           /* y := x * log2 (e) */
-        fstcw   cw1
-        movw    cw1, %ax
-        andw    $0xf3ff, %ax
-        orw     $0x0400, %ax            /* round down towards -inf */
-        movw    %ax, cw2
-        fldcw   cw2
-        fld     %st                     /* y, y */
-        frndint                         /* int (y), y */
-        fldcw   cw1
-        fxch    %st(1)                  /* y, int (y) */
-        fsub    %st(1), %st             /* frac (y), int (y) */
-        f2xm1                           /* 2^frac (y) - 1, int (y) */
-        faddl   __const_ONE             /* 2^frac (y), int (y) */
-        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
-        fstp    %st(1)                  /* 2^frac (y) * 2^int (y) */
-        CONV(x)                         /* convert to double */
-        _xam
-        j_inf   Lerror
-Lreturn:addl    $4, %esp                /* Remove control words */
-        EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($ERANGE)
-        jmp     Lreturn
-
-        ALIGN
-Lminf:  fstp    %st(0)                  /* Pop x */
-        fldl    __const_ZERO            /* Return +0 */
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/expl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/expl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/expl.s	(revision 2015)
@@ -0,0 +1,62 @@
+/ exp.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(expl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double exp (double x)
+
+#define cw1      0(%esp)
+#define cw2      2(%esp)
+/define ret_addr 4(%esp)
+#define x        8(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        subl    $4, %esp                /* space for control words */
+        FLD     x                       /* x */
+        fxam
+        fstsw  %ax
+        andb    $0x47, %ah
+        cmpb    $5, %ah
+        je      Lreturn                 /* x = +INF => return x */
+        cmpb    $7, %ah
+        je      Lminf                   /* x = -INF => return 0 */
+        fldl2e                          /* log2 (e) */
+        fmulp                           /* y := x * log2 (e) */
+        fstcw   cw1
+        movw    cw1, %ax
+        andw    $0xf3ff, %ax
+        orw     $0x0400, %ax            /* round down towards -inf */
+        movw    %ax, cw2
+        fldcw   cw2
+        fld     %st                     /* y, y */
+        frndint                         /* int (y), y */
+        fldcw   cw1
+        fxch    %st(1)                  /* y, int (y) */
+        fsub    %st(1), %st             /* frac (y), int (y) */
+        f2xm1                           /* 2^frac (y) - 1, int (y) */
+        faddl   __const_ONE             /* 2^frac (y), int (y) */
+        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
+        fstp    %st(1)                  /* 2^frac (y) * 2^int (y) */
+        CONV(x)                         /* convert to double */
+        _xam
+        j_inf   Lerror
+Lreturn:addl    $4, %esp                /* Remove control words */
+        EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($ERANGE)
+        jmp     Lreturn
+
+        ALIGN
+Lminf:  fstp    %st(0)                  /* Pop x */
+        fldl    __const_ZERO            /* Return +0 */
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/fmod.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/fmod.s	(revision 2014)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/ fmod.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
-/                     Modified 1993-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(fmodl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double fmod (double x, double y)
-
-/define ret_addr  0(%esp)
-#define x         4(%esp)
-#if defined (LONG_DOUBLE)
-#define y        16(%esp)
-#else
-#define y        12(%esp)
-#endif
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     y                       /* y */
-        ftst
-        fstsw   %ax
-        andw    $0x4100, %ax
-        xorb    $0x40, %ah
-        jz      2f                      /* y = 0 ? */
-        FLD     x                       /* x */
-1:      fprem
-        fstsw   %ax
-        andb    $0x04, %ah
-        jnz     1b                      /* C2 != 0 ? */
-        fstp    %st(1)
-2:      EPILOGUE(FUNC)
Index: /trunk/src/emx/src/lib/math/386/fmodl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/fmodl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/fmodl.s	(revision 2015)
@@ -0,0 +1,39 @@
+/ fmod.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
+/                     Modified 1993-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(fmodl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double fmod (double x, double y)
+
+/define ret_addr  0(%esp)
+#define x         4(%esp)
+#if defined (LONG_DOUBLE)
+#define y        16(%esp)
+#else
+#define y        12(%esp)
+#endif
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     y                       /* y */
+        ftst
+        fstsw   %ax
+        andw    $0x4100, %ax
+        xorb    $0x40, %ah
+        jz      2f                      /* y = 0 ? */
+        FLD     x                       /* x */
+1:      fprem
+        fstsw   %ax
+        andb    $0x04, %ah
+        jnz     1b                      /* C2 != 0 ? */
+        fstp    %st(1)
+2:      EPILOGUE(FUNC)
Index: unk/src/emx/src/lib/math/386/hypot.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/hypot.s	(revision 2014)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/ hypot.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
-
-/ As the arguments are double and the computation is done in extended
-/ format, an iterative method or scaling is not required to avoid overflow.
-/ However, such an algorithm should perhaps be used for _hypotl().
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(hypotl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double _hypot (double x, double y)
-
-#define x        4(%esp)
-#if defined (LONG_DOUBLE)
-#define y       16(%esp)
-#else
-#define y       12(%esp)
-#endif
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fld     %st                     /* x, x */
-        fmulp                           /* x*x */
-        FLD     y                       /* y, x*x */
-        fld     %st                     /* y, y, x*x */
-        fmulp                           /* y*y, x*x */
-        faddp                           /* y*y + x*x */
-        fsqrt                           /* hypot (x, y) */
-        CONV(x)                         /* convert to double */
-        _xam
-        j_inf   Lerror
-Lreturn:
-        EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($ERANGE)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/hypotl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/hypotl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/hypotl.s	(revision 2015)
@@ -0,0 +1,45 @@
+/ hypot.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
+
+/ As the arguments are double and the computation is done in extended
+/ format, an iterative method or scaling is not required to avoid overflow.
+/ However, such an algorithm should perhaps be used for _hypotl().
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(hypotl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double _hypot (double x, double y)
+
+#define x        4(%esp)
+#if defined (LONG_DOUBLE)
+#define y       16(%esp)
+#else
+#define y       12(%esp)
+#endif
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fld     %st                     /* x, x */
+        fmulp                           /* x*x */
+        FLD     y                       /* y, x*x */
+        fld     %st                     /* y, y, x*x */
+        fmulp                           /* y*y, x*x */
+        faddp                           /* y*y + x*x */
+        fsqrt                           /* hypot (x, y) */
+        CONV(x)                         /* convert to double */
+        _xam
+        j_inf   Lerror
+Lreturn:
+        EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($ERANGE)
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/log.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/log.s	(revision 2014)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/ log.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(logl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double log (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fxam
-        fstsw  %ax
-        andb    $0x47, %ah
-        cmpb    $5, %ah
-        je      Lreturn                 /* x = +INF => return x */
-        fldl2e
-        fdivrl  __const_ONE
-        fxch    %st(1)
-        fyl2x
-        _xam
-        j_nan   Lerror
-        j_inf   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/log10.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/log10.s	(revision 2014)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/ log10.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(log10l)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double log10 (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fxam
-        fstsw  %ax
-        andb    $0x47, %ah
-        cmpb    $5, %ah
-        je      Lreturn                 /* x = +INF => return x */
-        fldl2t
-        fdivrl  __const_ONE
-        fxch    %st(1)
-        fyl2x
-        _xam
-        j_nan   Lerror
-        j_inf   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/log10l.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/log10l.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/log10l.s	(revision 2015)
@@ -0,0 +1,37 @@
+/ log10.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(log10l)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double log10 (double x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fxam
+        fstsw  %ax
+        andb    $0x47, %ah
+        cmpb    $5, %ah
+        je      Lreturn                 /* x = +INF => return x */
+        fldl2t
+        fdivrl  __const_ONE
+        fxch    %st(1)
+        fyl2x
+        _xam
+        j_nan   Lerror
+        j_inf   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($EDOM)
+        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/logl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/logl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/logl.s	(revision 2015)
@@ -0,0 +1,37 @@
+/ log.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(logl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double log (double x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fxam
+        fstsw  %ax
+        andb    $0x47, %ah
+        cmpb    $5, %ah
+        je      Lreturn                 /* x = +INF => return x */
+        fldl2e
+        fdivrl  __const_ONE
+        fxch    %st(1)
+        fyl2x
+        _xam
+        j_nan   Lerror
+        j_inf   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($EDOM)
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/pow.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/pow.s	(revision 2014)
+++ 	(revision )
@@ -1,319 +1,0 @@
-/ pow.s (emx+gcc) -- Copyright (c) 1991-1993 by Kolja Elsaesser
-/                    Modified 1992-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(powl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double pow (double x, double y)
-
-#define cw_user       -4(%ebp)
-#define cw_chop       -2(%ebp)
-/define saved_ebp      0(%ebp)
-/define ret_addr       4(%ebp)
-#define x              8(%ebp)
-#if defined (LONG_DOUBLE)
-#define y             20(%ebp)
-#else
-#define y             16(%ebp)
-#endif
-
-FUNC:
-        pushl   %ebp
-        movl    %esp, %ebp
-        PROFILE_FRAME
-        subl    $4, %esp
-        pushf                           /* Save flags */
-        fstcw   cw_user
-        movw    cw_user, %ax
-        orw     $0x0c00, %ax            /* Chop by truncating toward 0 */
-        movw    %ax, cw_chop
-        FLD     y
-        fxam
-        fstsw  %ax
-        movb    %ah, %al
-        andb    $0x47, %al
-        cmpb    $5, %al
-        je      Ly_pinf                 /* y = +INF */
-        cmpb    $7, %al
-        je      Ly_minf                 /* y = -INF */
-        andb    $0x45, %al
-        cmpb    $1, %al
-        je      Ly_nan                  /* y = NAN */
-        cmpb    $0x40, %al
-        je      Ly_zero                 /* y = 0 */
-        movb    %ah, %cl                /* cl := fxam(y) */
-
-/ -INF < y < 0 or 0 < y < INF.  Check x.
-
-        FLD     x
-        fxam
-        fstsw   %ax
-        movb    %ah, %al
-        andb    $0x47, %al
-        cmpb    $5, %al
-        je      Lx_pinf                 /* x = +INF */
-        cmpb    $7, %al
-        je      Lx_minf                 /* x = -INF */
-        andb    $0x45, %al
-        cmpb    $1, %al
-        je      Lx_nan                  /* x = NAN */
-        cmpb    $0x40, %al
-        je      Lx_zero                 /* x = 0 */
-        test    $2, %ah
-        jnz     Lx_neg                  /* x < 0 */
-
-/ x > 0, y non-zero and finite
-
-Lx_pos: call    Lpower
-        jmp     Ldone
-
-/ x > 0, y non-zero and finite, overflow of y*log(x)
-        ALIGN
-Lx_pos_ov:
-        FLD     x
-        fcomps  Lone
-        fnstsw  %ax
-        sahf
-        ja      Ldone
-        fchs
-        jmp     Ldone
-
-/ x = 0, y non-zero and finite
-
-        ALIGN
-Lx_zero:testb   $2, %cl
-        jnz     Lx_zero_y_neg
-
-/ x = 0, y > 0
-
-        fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        cmpl    $1, %eax                /* Odd integer? */
-        je      Ldone                   /* Yes: return x (+0 or -0) */
-        fstp    %st(0)                  /* Pop x */
-        fldl    __const_ZERO            /* No: return +0 */
-        jmp     Ldone
-
-/ x = 0, y < 0
-Lx_zero_y_neg:
-        movb    %ah, %ch                /* ch := fxam(x) */
-        fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        cmpl    $1, %eax                /* Odd integer? */
-        je      L1                      /* Yes: return 1/x (divide by zero) */
-        fstp    %st(0)                  /* Pop x */
-        fldl    __const_ZERO
-L1:     fdivrs  Lone
-        jmp     Ldone
-
-/ x = +INF, y non-zero and finite
-        ALIGN
-Lx_pinf:fstp    %st(1)                  /* pop x, st(0):=x */
-        testb   $2, %cl                 /* y > 0? */
-        jz      Ldone                   /* Yes: return x = +INF */
-        fstp    %st(0)                  /* Pop x */
-        fldl    __const_ZERO            /* Return +0 */
-        jmp     Ldone
-
-/ x = -INF, y non-zero and finite
-        ALIGN
-Lx_minf:testb   $2, %cl                 /* y < 0? */
-        jnz     Lx_minf_y_neg           /* Yes -> return +0 or -0 */
-        fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        cmpl    $1, %eax                /* Is y an odd integer? */
-        je      Ldone                   /* Yes: return x = -INF */
-        fchs                            /* No: return -x = +INF */
-        jmp     Ldone
-
-/ x = +INF, y < 0 and finite
-        ALIGN
-Lx_minf_y_neg:
-        fstp    %st(0)                  /* Pop x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        fldl    __const_ZERO
-        cmpl    $1, %eax                /* Is y an odd integer? */
-        jne     Ldone                   /* No: return +0 */
-        fchs                            /* Yes: return -0 */
-        jmp     Ldone
-
-/ x = NAN, y non-zero and finite
-        ALIGN
-Lx_nan: fstp    %st(1)
-        jmp     Ldone
-
-/ y = 0
-        ALIGN
-Ly_zero:
-        fstp    %st(0)
-        flds    Lone
-        jmp     Ldone
-
-/ x < 0, y non-zero and finite
-        ALIGN
-Lx_neg: fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        cmp     $0, %eax                /* Is y an integer? */
-        je      Lx_neg_invalid          /* No -> return NAN */
-        fxch    %st(1)                  /* st(0) := x, st(1) := y */
-        fchs                            /* st(0) := -x */
-        movl    %eax, %ecx              /* Remember whether y is odd or not */
-        call    Lpower
-/ Change sign if y is odd
-        cmpl    $1, %ecx
-        jne     Ldone
-        fchs
-        jmp     Ldone
-
-/ x < 0, y not an integer
-        ALIGN
-Lx_neg_invalid:
-        fstp    %st(0)                  /* Pop y */
-        fstp    %st(0)                  /* Pop x */
-        jmp     Linvalid
-
-        ALIGN
-Ly_nan:                                 /* pow(x,NAN) = NAN */
-Ldone:  CONV(x)                         /* convert to double */
-        popf
-        leave
-        _xam
-        j_inf   Lerange
-        j_nan   Ledom
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerange:SET_ERRNO_CONST($ERANGE)
-        jmp     Lreturn
-
-        ALIGN
-Ledom:  SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
-
-/ pow(x,+INF)
-        ALIGN
-Ly_pinf:fstp    %st(0)
-        FLD     x
-        _xam
-        j_nan   Ldone
-        fabs
-        fcoms   Lone
-        fnstsw  %ax
-        fstp    %st(0)
-        sahf
-        jz      Linvalid
-        ja      Lret_pinf
-Lret_zero:
-        fldl    __const_ZERO
-        jmp     Ldone
-
-/ pow(x,-INF)
-        ALIGN
-Ly_minf:fstp    %st(0)                  /* Pop y */
-        FLD     x
-        _xam
-        j_nan   Ldone
-        fabs
-        fcoms   Lone
-        fnstsw  %ax
-        fstp    %st(0)                  /* Pop x */
-        sahf
-        jz      Linvalid
-        ja      Lret_zero
-Lret_pinf:
-        fldl    __HUGE_VAL
-        jmp     Ldone
-
-        ALIGN
-Linvalid:
-        fldl    __const_ZERO
-        fdivl   __const_ZERO
-        jmp     Ldone
-
-
-/ Check if x (in st(0)) is an odd integer
-/ Returns:
-/	0       x is not an integer
-/       1       x is an odd integer
-/       2       x is an even integer (or too big to be odd)
-/ x is not removed from the stack
-        ALIGN
-Lis_odd_int:
-        fld     %st                     /* st(0)=x, st(1)=x */
-        fldcw   cw_chop
-        frndint                         /* st(0)=int(x), st(1)=x */
-        fldcw   cw_user
-        fcom    %st(1)
-        fnstsw  %ax
-        sahf
-        jnz     Lnot_int                /* x not an integer */
-        fmuls   Lhalf                   /* st(0)=x/2, st(1)=x */
-        fldcw   cw_chop
-        frndint
-        fldcw   cw_user
-        fmuls   Ltwo                    /* st(0)=2*(x/2), st(1)=x */
-        fcomp   %st(1)
-        fnstsw  %ax
-        sahf
-        jnz     Lodd
-        movl    $2, %eax
-        ret
-
-        ALIGN
-Lodd:   movl    $1, %eax
-        ret
-
-        ALIGN
-Lnot_int:
-        fstp    %st(0)                  /* pop int(x) */
-        movl    $0, %eax
-        ret
-
-/ Compute st(0) ^ st(1)
-/ Note:  References x!
-
-        ALIGN
-Lpower:
-        fyl2x                           /* st(1) * log(st(0)) */
-        _xam
-        j_inf   Lpower_overflow
-        fld     %st
-        fldcw   cw_chop
-        frndint
-        fldcw   cw_user
-        fsubr   %st, %st(1)
-        fxch    %st(1)
-        f2xm1
-        fadds   Lone    /* TODO: to avoid overflow, scale 1.0, add later */
-        fscale
-        fstp    %st(1)                  /* Remove the scaling factor */
-        ret
-
-        ALIGN
-Lpower_overflow:
-        fabs
-        FLD     x
-        fabs
-        fcomps  Lone
-        fnstsw  %ax
-        sahf
-        ja      Lpower_ret
-        fdivrs  Lone
-Lpower_ret:
-        ret
-
-Lhalf:  .long 0x3f000000
-Lone:   .long 0x3f800000
-Ltwo:   .long 0x40000000
Index: /trunk/src/emx/src/lib/math/386/powl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/powl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/powl.s	(revision 2015)
@@ -0,0 +1,319 @@
+/ pow.s (emx+gcc) -- Copyright (c) 1991-1993 by Kolja Elsaesser
+/                    Modified 1992-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(powl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double pow (double x, double y)
+
+#define cw_user       -4(%ebp)
+#define cw_chop       -2(%ebp)
+/define saved_ebp      0(%ebp)
+/define ret_addr       4(%ebp)
+#define x              8(%ebp)
+#if defined (LONG_DOUBLE)
+#define y             20(%ebp)
+#else
+#define y             16(%ebp)
+#endif
+
+FUNC:
+        pushl   %ebp
+        movl    %esp, %ebp
+        PROFILE_FRAME
+        subl    $4, %esp
+        pushf                           /* Save flags */
+        fstcw   cw_user
+        movw    cw_user, %ax
+        orw     $0x0c00, %ax            /* Chop by truncating toward 0 */
+        movw    %ax, cw_chop
+        FLD     y
+        fxam
+        fstsw  %ax
+        movb    %ah, %al
+        andb    $0x47, %al
+        cmpb    $5, %al
+        je      Ly_pinf                 /* y = +INF */
+        cmpb    $7, %al
+        je      Ly_minf                 /* y = -INF */
+        andb    $0x45, %al
+        cmpb    $1, %al
+        je      Ly_nan                  /* y = NAN */
+        cmpb    $0x40, %al
+        je      Ly_zero                 /* y = 0 */
+        movb    %ah, %cl                /* cl := fxam(y) */
+
+/ -INF < y < 0 or 0 < y < INF.  Check x.
+
+        FLD     x
+        fxam
+        fstsw   %ax
+        movb    %ah, %al
+        andb    $0x47, %al
+        cmpb    $5, %al
+        je      Lx_pinf                 /* x = +INF */
+        cmpb    $7, %al
+        je      Lx_minf                 /* x = -INF */
+        andb    $0x45, %al
+        cmpb    $1, %al
+        je      Lx_nan                  /* x = NAN */
+        cmpb    $0x40, %al
+        je      Lx_zero                 /* x = 0 */
+        test    $2, %ah
+        jnz     Lx_neg                  /* x < 0 */
+
+/ x > 0, y non-zero and finite
+
+Lx_pos: call    Lpower
+        jmp     Ldone
+
+/ x > 0, y non-zero and finite, overflow of y*log(x)
+        ALIGN
+Lx_pos_ov:
+        FLD     x
+        fcomps  Lone
+        fnstsw  %ax
+        sahf
+        ja      Ldone
+        fchs
+        jmp     Ldone
+
+/ x = 0, y non-zero and finite
+
+        ALIGN
+Lx_zero:testb   $2, %cl
+        jnz     Lx_zero_y_neg
+
+/ x = 0, y > 0
+
+        fxch    %st(1)                  /* st(0) := y, st(1) := x */
+        call    Lis_odd_int
+        fstp    %st(0)                  /* Pop y */
+        cmpl    $1, %eax                /* Odd integer? */
+        je      Ldone                   /* Yes: return x (+0 or -0) */
+        fstp    %st(0)                  /* Pop x */
+        fldl    __const_ZERO            /* No: return +0 */
+        jmp     Ldone
+
+/ x = 0, y < 0
+Lx_zero_y_neg:
+        movb    %ah, %ch                /* ch := fxam(x) */
+        fxch    %st(1)                  /* st(0) := y, st(1) := x */
+        call    Lis_odd_int
+        fstp    %st(0)                  /* Pop y */
+        cmpl    $1, %eax                /* Odd integer? */
+        je      L1                      /* Yes: return 1/x (divide by zero) */
+        fstp    %st(0)                  /* Pop x */
+        fldl    __const_ZERO
+L1:     fdivrs  Lone
+        jmp     Ldone
+
+/ x = +INF, y non-zero and finite
+        ALIGN
+Lx_pinf:fstp    %st(1)                  /* pop x, st(0):=x */
+        testb   $2, %cl                 /* y > 0? */
+        jz      Ldone                   /* Yes: return x = +INF */
+        fstp    %st(0)                  /* Pop x */
+        fldl    __const_ZERO            /* Return +0 */
+        jmp     Ldone
+
+/ x = -INF, y non-zero and finite
+        ALIGN
+Lx_minf:testb   $2, %cl                 /* y < 0? */
+        jnz     Lx_minf_y_neg           /* Yes -> return +0 or -0 */
+        fxch    %st(1)                  /* st(0) := y, st(1) := x */
+        call    Lis_odd_int
+        fstp    %st(0)                  /* Pop y */
+        cmpl    $1, %eax                /* Is y an odd integer? */
+        je      Ldone                   /* Yes: return x = -INF */
+        fchs                            /* No: return -x = +INF */
+        jmp     Ldone
+
+/ x = +INF, y < 0 and finite
+        ALIGN
+Lx_minf_y_neg:
+        fstp    %st(0)                  /* Pop x */
+        call    Lis_odd_int
+        fstp    %st(0)                  /* Pop y */
+        fldl    __const_ZERO
+        cmpl    $1, %eax                /* Is y an odd integer? */
+        jne     Ldone                   /* No: return +0 */
+        fchs                            /* Yes: return -0 */
+        jmp     Ldone
+
+/ x = NAN, y non-zero and finite
+        ALIGN
+Lx_nan: fstp    %st(1)
+        jmp     Ldone
+
+/ y = 0
+        ALIGN
+Ly_zero:
+        fstp    %st(0)
+        flds    Lone
+        jmp     Ldone
+
+/ x < 0, y non-zero and finite
+        ALIGN
+Lx_neg: fxch    %st(1)                  /* st(0) := y, st(1) := x */
+        call    Lis_odd_int
+        cmp     $0, %eax                /* Is y an integer? */
+        je      Lx_neg_invalid          /* No -> return NAN */
+        fxch    %st(1)                  /* st(0) := x, st(1) := y */
+        fchs                            /* st(0) := -x */
+        movl    %eax, %ecx              /* Remember whether y is odd or not */
+        call    Lpower
+/ Change sign if y is odd
+        cmpl    $1, %ecx
+        jne     Ldone
+        fchs
+        jmp     Ldone
+
+/ x < 0, y not an integer
+        ALIGN
+Lx_neg_invalid:
+        fstp    %st(0)                  /* Pop y */
+        fstp    %st(0)                  /* Pop x */
+        jmp     Linvalid
+
+        ALIGN
+Ly_nan:                                 /* pow(x,NAN) = NAN */
+Ldone:  CONV(x)                         /* convert to double */
+        popf
+        leave
+        _xam
+        j_inf   Lerange
+        j_nan   Ledom
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerange:SET_ERRNO_CONST($ERANGE)
+        jmp     Lreturn
+
+        ALIGN
+Ledom:  SET_ERRNO_CONST($EDOM)
+        jmp     Lreturn
+
+/ pow(x,+INF)
+        ALIGN
+Ly_pinf:fstp    %st(0)
+        FLD     x
+        _xam
+        j_nan   Ldone
+        fabs
+        fcoms   Lone
+        fnstsw  %ax
+        fstp    %st(0)
+        sahf
+        jz      Linvalid
+        ja      Lret_pinf
+Lret_zero:
+        fldl    __const_ZERO
+        jmp     Ldone
+
+/ pow(x,-INF)
+        ALIGN
+Ly_minf:fstp    %st(0)                  /* Pop y */
+        FLD     x
+        _xam
+        j_nan   Ldone
+        fabs
+        fcoms   Lone
+        fnstsw  %ax
+        fstp    %st(0)                  /* Pop x */
+        sahf
+        jz      Linvalid
+        ja      Lret_zero
+Lret_pinf:
+        fldl    __HUGE_VAL
+        jmp     Ldone
+
+        ALIGN
+Linvalid:
+        fldl    __const_ZERO
+        fdivl   __const_ZERO
+        jmp     Ldone
+
+
+/ Check if x (in st(0)) is an odd integer
+/ Returns:
+/	0       x is not an integer
+/       1       x is an odd integer
+/       2       x is an even integer (or too big to be odd)
+/ x is not removed from the stack
+        ALIGN
+Lis_odd_int:
+        fld     %st                     /* st(0)=x, st(1)=x */
+        fldcw   cw_chop
+        frndint                         /* st(0)=int(x), st(1)=x */
+        fldcw   cw_user
+        fcom    %st(1)
+        fnstsw  %ax
+        sahf
+        jnz     Lnot_int                /* x not an integer */
+        fmuls   Lhalf                   /* st(0)=x/2, st(1)=x */
+        fldcw   cw_chop
+        frndint
+        fldcw   cw_user
+        fmuls   Ltwo                    /* st(0)=2*(x/2), st(1)=x */
+        fcomp   %st(1)
+        fnstsw  %ax
+        sahf
+        jnz     Lodd
+        movl    $2, %eax
+        ret
+
+        ALIGN
+Lodd:   movl    $1, %eax
+        ret
+
+        ALIGN
+Lnot_int:
+        fstp    %st(0)                  /* pop int(x) */
+        movl    $0, %eax
+        ret
+
+/ Compute st(0) ^ st(1)
+/ Note:  References x!
+
+        ALIGN
+Lpower:
+        fyl2x                           /* st(1) * log(st(0)) */
+        _xam
+        j_inf   Lpower_overflow
+        fld     %st
+        fldcw   cw_chop
+        frndint
+        fldcw   cw_user
+        fsubr   %st, %st(1)
+        fxch    %st(1)
+        f2xm1
+        fadds   Lone    /* TODO: to avoid overflow, scale 1.0, add later */
+        fscale
+        fstp    %st(1)                  /* Remove the scaling factor */
+        ret
+
+        ALIGN
+Lpower_overflow:
+        fabs
+        FLD     x
+        fabs
+        fcomps  Lone
+        fnstsw  %ax
+        sahf
+        ja      Lpower_ret
+        fdivrs  Lone
+Lpower_ret:
+        ret
+
+Lhalf:  .long 0x3f000000
+Lone:   .long 0x3f800000
+Ltwo:   .long 0x40000000
Index: unk/src/emx/src/lib/math/386/rint.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/rint.s	(revision 2014)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/ rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(rintl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double _rint (double x)
-
-#define cw1       0(%esp)
-#define cw2       2(%esp)
-/define ret_addr  4(%esp)
-#define x         8(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        subl    $4, %esp
-        fstcw   cw1
-        movw    cw1, %ax
-        andw    $0xf3ff, %ax            /* round to nearest or even */
-        movw    %ax, cw2
-        fldcw   cw2
-        FLD     x                       /* x */
-        frndint
-        fldcw   cw1
-        addl    $4, %esp
-        EPILOGUE(FUNC)
Index: /trunk/src/emx/src/lib/math/386/rintl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/rintl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/rintl.s	(revision 2015)
@@ -0,0 +1,33 @@
+/ rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(rintl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double _rint (double x)
+
+#define cw1       0(%esp)
+#define cw2       2(%esp)
+/define ret_addr  4(%esp)
+#define x         8(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        subl    $4, %esp
+        fstcw   cw1
+        movw    cw1, %ax
+        andw    $0xf3ff, %ax            /* round to nearest or even */
+        movw    %ax, cw2
+        fldcw   cw2
+        FLD     x                       /* x */
+        frndint
+        fldcw   cw1
+        addl    $4, %esp
+        EPILOGUE(FUNC)
Index: unk/src/emx/src/lib/math/386/sin.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/sin.s	(revision 2014)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/ sin.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
-/                    Modified 1993-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(sinl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double sin (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fsin                            /* sin(x) */
-        fstsw   %ax
-        testb   $0x04, %ah
-        jnz     Llarge                  /* C2 != 0 ? */
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Llarge: fldl    __const_ZERO            /* sin(large):=0 */
-        fstp    %st(1)
-        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/sinh.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/sinh.s	(revision 2014)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/ sinh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(sinhl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double sinh (double x)
-
-#define cw1      0(%esp)
-#define cw2      2(%esp)
-/define ret_addr 4(%esp)
-#define x        8(%esp)
-
-/ sinh(x) = 0.5 * (exp(x) - exp(-x)) = 0.5 * (exp(x) - 1/exp(x))
-
-FUNC:
-        PROFILE_NOFRAME
-        subl    $4, %esp                /* space for control words */
-        FLD     x                       /* x */
-        fldl2e                          /* log2 (e) */
-        fmulp                           /* y := x * log2 (e) */
-        fstcw   cw1
-        movw    cw1, %ax
-        andw    $0xf3ff, %ax
-        orw     $0x0400, %ax            /* round down towards -inf */
-        movw    %ax, cw2
-        fldcw   cw2
-        fld     %st                     /* y, y */
-        frndint                         /* int (y), y */
-        fldcw   cw1
-        fxch    %st(1)                  /* y, int (y) */
-        fsub    %st(1), %st             /* frac (y), int (y) */
-        f2xm1                           /* 2^frac (y) - 1, int (y) */
-        faddl   __const_ONE             /* 2^frac (y), int (y) */
-        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
-        fst     %st(1)                  /* exp(x), exp(x) */
-        fdivrl  __const_ONE             /* exp(-x), exp(x) */
-        fsubrp                          /* exp(x) - exp(-x) */
-        fmull   __const_HALF            /* 0.5 * (exp(x) - exp(-x)) */
-        CONV(x)                         /* convert to double */
-        addl    $4, %esp                /* Remove control words */
-        _xam
-        j_inf   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($ERANGE)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/sinhl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/sinhl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/sinhl.s	(revision 2015)
@@ -0,0 +1,55 @@
+/ sinh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(sinhl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double sinh (double x)
+
+#define cw1      0(%esp)
+#define cw2      2(%esp)
+/define ret_addr 4(%esp)
+#define x        8(%esp)
+
+/ sinh(x) = 0.5 * (exp(x) - exp(-x)) = 0.5 * (exp(x) - 1/exp(x))
+
+FUNC:
+        PROFILE_NOFRAME
+        subl    $4, %esp                /* space for control words */
+        FLD     x                       /* x */
+        fldl2e                          /* log2 (e) */
+        fmulp                           /* y := x * log2 (e) */
+        fstcw   cw1
+        movw    cw1, %ax
+        andw    $0xf3ff, %ax
+        orw     $0x0400, %ax            /* round down towards -inf */
+        movw    %ax, cw2
+        fldcw   cw2
+        fld     %st                     /* y, y */
+        frndint                         /* int (y), y */
+        fldcw   cw1
+        fxch    %st(1)                  /* y, int (y) */
+        fsub    %st(1), %st             /* frac (y), int (y) */
+        f2xm1                           /* 2^frac (y) - 1, int (y) */
+        faddl   __const_ONE             /* 2^frac (y), int (y) */
+        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
+        fst     %st(1)                  /* exp(x), exp(x) */
+        fdivrl  __const_ONE             /* exp(-x), exp(x) */
+        fsubrp                          /* exp(x) - exp(-x) */
+        fmull   __const_HALF            /* 0.5 * (exp(x) - exp(-x)) */
+        CONV(x)                         /* convert to double */
+        addl    $4, %esp                /* Remove control words */
+        _xam
+        j_inf   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($ERANGE)
+        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/sinl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/sinl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/sinl.s	(revision 2015)
@@ -0,0 +1,31 @@
+/ sin.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
+/                    Modified 1993-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(sinl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double sin (double x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fsin                            /* sin(x) */
+        fstsw   %ax
+        testb   $0x04, %ah
+        jnz     Llarge                  /* C2 != 0 ? */
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Llarge: fldl    __const_ZERO            /* sin(large):=0 */
+        fstp    %st(1)
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/sqrt.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/sqrt.s	(revision 2014)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/ sqrt.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(sqrtl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double sqrt (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fsqrt
-        _xam
-        j_nan   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/sqrtl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/sqrtl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/sqrtl.s	(revision 2015)
@@ -0,0 +1,28 @@
+/ sqrt.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(sqrtl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double sqrt (double x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fsqrt
+        _xam
+        j_nan   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($EDOM)
+        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/tan.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/tan.s	(revision 2014)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/ tan.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
-/                    Modified 1993-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(tanl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double tan (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fptan
-
-/* Note: fptan is followed by fstsw , avoiding a bug in the 486. */
-
-        fstsw   %ax
-        testb   $0x04, %ah
-        jnz     Llarge                  /* C2 != 0 ? */
-
-/* This used to be fdivrp.  However, on the 387, as opposed to the 8087,
-   st(0) is always 1 after fptan. */
-
-        fstp    %st(0)
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Llarge: fldl    __const_ZERO            /* tan(large):=0 */
-        fstp    %st(1)
-        fstp    %st(1)
-        jmp     Lreturn
Index: unk/src/emx/src/lib/math/386/tanh.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/tanh.s	(revision 2014)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/ tanh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(tanhl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double tanh (double x)
-
-#define cw1      0(%esp)
-#define cw2      2(%esp)
-/define ret_addr 4(%esp)
-#define x        8(%esp)
-
-/ tanh(x) = (t-1.0) / (t+1.0) with t = exp (2.0 * x)
-
-FUNC:
-        PROFILE_NOFRAME
-        subl    $4, %esp                /* space for control words */
-        FLD     x                       /* x */
-        fmull   __const_TWO             /* 2x */
-        fldl2e                          /* log2 (e) */
-        fmulp                           /* y := 2x * log2 (e) */
-        fstcw   cw1
-        movw    cw1, %ax
-        andw    $0xf3ff, %ax
-        orw     $0x0400, %ax            /* round down towards -inf */
-        movw    %ax, cw2
-        fldcw   cw2
-        fld     %st                     /* y, y */
-        frndint                         /* int (y), y */
-        fldcw   cw1
-        fxch    %st(1)                  /* y, int (y) */
-        fsub    %st(1), %st             /* frac (y), int (y) */
-        f2xm1                           /* 2^frac (y) - 1, int (y) */
-        faddl   __const_ONE             /* 2^frac (y), int (y) */
-        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
-        fstp    %st(1)                  /* 2^frac (y) * 2^int (y) */
-        fld     %st                     /* t, t */
-        faddl   __const_ONE             /* t+1, t */
-        fxch    %st(1)                  /* t, t+1 */
-        fsubl   __const_ONE             /* t-1, t+1 */
-        fdivp                           /* (t-1)/(t+1) */
-        CONV(x)                         /* convert to double */
-        addl    $4, %esp                /* Remove control words */
-        _xam
-        j_inf   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($ERANGE)
-        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/tanhl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/tanhl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/tanhl.s	(revision 2015)
@@ -0,0 +1,58 @@
+/ tanh.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(tanhl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double tanh (double x)
+
+#define cw1      0(%esp)
+#define cw2      2(%esp)
+/define ret_addr 4(%esp)
+#define x        8(%esp)
+
+/ tanh(x) = (t-1.0) / (t+1.0) with t = exp (2.0 * x)
+
+FUNC:
+        PROFILE_NOFRAME
+        subl    $4, %esp                /* space for control words */
+        FLD     x                       /* x */
+        fmull   __const_TWO             /* 2x */
+        fldl2e                          /* log2 (e) */
+        fmulp                           /* y := 2x * log2 (e) */
+        fstcw   cw1
+        movw    cw1, %ax
+        andw    $0xf3ff, %ax
+        orw     $0x0400, %ax            /* round down towards -inf */
+        movw    %ax, cw2
+        fldcw   cw2
+        fld     %st                     /* y, y */
+        frndint                         /* int (y), y */
+        fldcw   cw1
+        fxch    %st(1)                  /* y, int (y) */
+        fsub    %st(1), %st             /* frac (y), int (y) */
+        f2xm1                           /* 2^frac (y) - 1, int (y) */
+        faddl   __const_ONE             /* 2^frac (y), int (y) */
+        fscale                          /* 2^frac (y) * 2^int (y), int (y) */
+        fstp    %st(1)                  /* 2^frac (y) * 2^int (y) */
+        fld     %st                     /* t, t */
+        faddl   __const_ONE             /* t+1, t */
+        fxch    %st(1)                  /* t, t+1 */
+        fsubl   __const_ONE             /* t-1, t+1 */
+        fdivp                           /* (t-1)/(t+1) */
+        CONV(x)                         /* convert to double */
+        addl    $4, %esp                /* Remove control words */
+        _xam
+        j_inf   Lerror
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Lerror: SET_ERRNO_CONST($ERANGE)
+        jmp     Lreturn
Index: /trunk/src/emx/src/lib/math/386/tanl.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/tanl.s	(revision 2015)
+++ /trunk/src/emx/src/lib/math/386/tanl.s	(revision 2015)
@@ -0,0 +1,40 @@
+/ tan.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
+/                    Modified 1993-1996 by Eberhard Mattes
+
+#define LONG_DOUBLE
+#include <emx/asm386.h>
+
+#define FUNC    _STD(tanl)
+
+        .globl  FUNC
+
+        .text
+
+        ALIGN
+
+/ double tan (double x)
+
+#define x       4(%esp)
+
+FUNC:
+        PROFILE_NOFRAME
+        FLD     x                       /* x */
+        fptan
+
+/* Note: fptan is followed by fstsw , avoiding a bug in the 486. */
+
+        fstsw   %ax
+        testb   $0x04, %ah
+        jnz     Llarge                  /* C2 != 0 ? */
+
+/* This used to be fdivrp.  However, on the 387, as opposed to the 8087,
+   st(0) is always 1 after fptan. */
+
+        fstp    %st(0)
+Lreturn:EPILOGUE(FUNC)
+
+        ALIGN
+Llarge: fldl    __const_ZERO            /* tan(large):=0 */
+        fstp    %st(1)
+        fstp    %st(1)
+        jmp     Lreturn
