summaryrefslogtreecommitdiff
path: root/sysdeps/libm-i387
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-i387')
-rw-r--r--sysdeps/libm-i387/s_fma.S32
-rw-r--r--sysdeps/libm-i387/s_fmaf.S32
-rw-r--r--sysdeps/libm-i387/s_fmal.S32
-rw-r--r--sysdeps/libm-i387/s_llrint.S2
-rw-r--r--sysdeps/libm-i387/s_llrintf.S34
-rw-r--r--sysdeps/libm-i387/s_llrintl.S34
-rw-r--r--sysdeps/libm-i387/s_lrint.S2
-rw-r--r--sysdeps/libm-i387/s_lrintf.S33
-rw-r--r--sysdeps/libm-i387/s_lrintl.S33
-rw-r--r--sysdeps/libm-i387/s_scalbln.c2
-rw-r--r--sysdeps/libm-i387/s_scalblnf.c2
-rw-r--r--sysdeps/libm-i387/s_scalblnl.c2
-rw-r--r--sysdeps/libm-i387/s_scalbn.S2
-rw-r--r--sysdeps/libm-i387/s_scalbnf.S2
-rw-r--r--sysdeps/libm-i387/s_scalbnl.S2
15 files changed, 244 insertions, 2 deletions
diff --git a/sysdeps/libm-i387/s_fma.S b/sysdeps/libm-i387/s_fma.S
new file mode 100644
index 0000000000..deeac574a7
--- /dev/null
+++ b/sysdeps/libm-i387/s_fma.S
@@ -0,0 +1,32 @@
+/* Compute (X * Y) + Z as ternary operation.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__fma)
+ fldl 4(%esp) // x
+ fldl 12(%esp) // x : y
+ fmulp // x * y
+ fldl 20(%esp) // z : x * y
+ fmulp // (x * y) + z
+ ret
+END(__fma)
+weak_alias (__fma, fma)
diff --git a/sysdeps/libm-i387/s_fmaf.S b/sysdeps/libm-i387/s_fmaf.S
new file mode 100644
index 0000000000..726c49d12c
--- /dev/null
+++ b/sysdeps/libm-i387/s_fmaf.S
@@ -0,0 +1,32 @@
+/* Compute (X * Y) + Z as ternary operation.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__fmaf)
+ flds 4(%esp) // x
+ flds 8(%esp) // x : y
+ fmulp // x * y
+ flds 12(%esp) // z : x * y
+ fmulp // (x * y) + z
+ ret
+END(__fmaf)
+weak_alias (__fmaf, fmaf)
diff --git a/sysdeps/libm-i387/s_fmal.S b/sysdeps/libm-i387/s_fmal.S
new file mode 100644
index 0000000000..be8b557902
--- /dev/null
+++ b/sysdeps/libm-i387/s_fmal.S
@@ -0,0 +1,32 @@
+/* Compute (X * Y) + Z as ternary operation.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__fmal)
+ fldt 4(%esp) // x
+ fldt 16(%esp) // x : y
+ fmulp // x * y
+ fldt 28(%esp) // z : x * y
+ fmulp // (x * y) + z
+ ret
+END(__fmal)
+weak_alias (__fmal, fmal)
diff --git a/sysdeps/libm-i387/s_llrint.S b/sysdeps/libm-i387/s_llrint.S
index 49bfebc993..6109ec45c3 100644
--- a/sysdeps/libm-i387/s_llrint.S
+++ b/sysdeps/libm-i387/s_llrint.S
@@ -23,7 +23,7 @@
.text
ENTRY(__llrint)
- fldt 4(%esp)
+ fldl 4(%esp)
subl $8, %esp
fistpll (%esp)
fwait
diff --git a/sysdeps/libm-i387/s_llrintf.S b/sysdeps/libm-i387/s_llrintf.S
new file mode 100644
index 0000000000..c1e1c225c0
--- /dev/null
+++ b/sysdeps/libm-i387/s_llrintf.S
@@ -0,0 +1,34 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__llrintf)
+ flds 4(%esp)
+ subl $8, %esp
+ fistpll (%esp)
+ fwait
+ popl %eax
+ popl %edx
+ ret
+END(__llrintf)
+weak_alias (__llrintf, llrintf)
diff --git a/sysdeps/libm-i387/s_llrintl.S b/sysdeps/libm-i387/s_llrintl.S
new file mode 100644
index 0000000000..d894897d5e
--- /dev/null
+++ b/sysdeps/libm-i387/s_llrintl.S
@@ -0,0 +1,34 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__llrintl)
+ fldt 4(%esp)
+ subl $8, %esp
+ fistpll (%esp)
+ fwait
+ popl %eax
+ popl %edx
+ ret
+END(__llrintl)
+weak_alias (__llrintl, llrintl)
diff --git a/sysdeps/libm-i387/s_lrint.S b/sysdeps/libm-i387/s_lrint.S
index 3be4ca7903..40956ab0d0 100644
--- a/sysdeps/libm-i387/s_lrint.S
+++ b/sysdeps/libm-i387/s_lrint.S
@@ -23,7 +23,7 @@
.text
ENTRY(__lrint)
- fldt 4(%esp)
+ fldl 4(%esp)
subl $4, %esp
fistpl (%esp)
fwait
diff --git a/sysdeps/libm-i387/s_lrintf.S b/sysdeps/libm-i387/s_lrintf.S
new file mode 100644
index 0000000000..2f49bdbabe
--- /dev/null
+++ b/sysdeps/libm-i387/s_lrintf.S
@@ -0,0 +1,33 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__lrintf)
+ flds 4(%esp)
+ subl $4, %esp
+ fistpl (%esp)
+ fwait
+ popl %eax
+ ret
+END(__lrintf)
+weak_alias (__lrintf, lrintf)
diff --git a/sysdeps/libm-i387/s_lrintl.S b/sysdeps/libm-i387/s_lrintl.S
new file mode 100644
index 0000000000..3a06c91b29
--- /dev/null
+++ b/sysdeps/libm-i387/s_lrintl.S
@@ -0,0 +1,33 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__lrintl)
+ fldt 4(%esp)
+ subl $4, %esp
+ fistpl (%esp)
+ fwait
+ popl %eax
+ ret
+END(__lrintl)
+weak_alias (__lrintl, lrintl)
diff --git a/sysdeps/libm-i387/s_scalbln.c b/sysdeps/libm-i387/s_scalbln.c
new file mode 100644
index 0000000000..1009713fbc
--- /dev/null
+++ b/sysdeps/libm-i387/s_scalbln.c
@@ -0,0 +1,2 @@
+/* Nothing to do. This function is the same as scalbn. So we define an
+ alias. */
diff --git a/sysdeps/libm-i387/s_scalblnf.c b/sysdeps/libm-i387/s_scalblnf.c
new file mode 100644
index 0000000000..5e558c3540
--- /dev/null
+++ b/sysdeps/libm-i387/s_scalblnf.c
@@ -0,0 +1,2 @@
+/* Nothing to do. This function is the same as scalbnf. So we define an
+ alias. */
diff --git a/sysdeps/libm-i387/s_scalblnl.c b/sysdeps/libm-i387/s_scalblnl.c
new file mode 100644
index 0000000000..cda2ec11c8
--- /dev/null
+++ b/sysdeps/libm-i387/s_scalblnl.c
@@ -0,0 +1,2 @@
+/* Nothing to do. This function is the same as scalbnl. So we define an
+ alias. */
diff --git a/sysdeps/libm-i387/s_scalbn.S b/sysdeps/libm-i387/s_scalbn.S
index 709b7a47f5..ea9e25f094 100644
--- a/sysdeps/libm-i387/s_scalbn.S
+++ b/sysdeps/libm-i387/s_scalbn.S
@@ -15,3 +15,5 @@ ENTRY(__scalbn)
ret
END (__scalbn)
weak_alias (__scalbn, scalbn)
+strong_alias (__scalbn, __scalbln)
+weak_alias (__scalbn, scalbln)
diff --git a/sysdeps/libm-i387/s_scalbnf.S b/sysdeps/libm-i387/s_scalbnf.S
index ce92113844..dc8cfb4296 100644
--- a/sysdeps/libm-i387/s_scalbnf.S
+++ b/sysdeps/libm-i387/s_scalbnf.S
@@ -15,3 +15,5 @@ ENTRY(__scalbnf)
ret
END (__scalbnf)
weak_alias (__scalbnf, scalbnf)
+strong_alias (__scalbnf, __scalblnf)
+weak_alias (__scalbnf, scalblnf)
diff --git a/sysdeps/libm-i387/s_scalbnl.S b/sysdeps/libm-i387/s_scalbnl.S
index 09e06457b8..295494b3d2 100644
--- a/sysdeps/libm-i387/s_scalbnl.S
+++ b/sysdeps/libm-i387/s_scalbnl.S
@@ -16,3 +16,5 @@ ENTRY(__scalbnl)
ret
END (__scalbnl)
weak_alias (__scalbnl, scalbnl)
+strong_alias (__scalbnl, __scalblnl)
+weak_alias (__scalbnl, scalblnl)