This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

two more i386/fpu files



Ok to commit?

Andreas

2001-05-06  Andreas Jaeger  <aj@suse.de>

	* sysdeps/i386/fpu/e_fmodl.c: New, rewrite of e_fmodl.S.
	* sysdeps/i386/fpu/e_fmodl.S: Remove.d
	* sysdeps/i386/fpu/e_atan2l.c: New, rewrite of e_atan2l.S.
	* sysdeps/i386/fpu/e_atan2l.S: Removed. 

============================================================
Index: sysdeps/i386/fpu/e_fmodl.c
--- sysdeps/i386/fpu/e_fmodl.c	created
+++ sysdeps/i386/fpu/e_fmodl.c	Sun May  6 18:59:56 2001	1.1
@@ -0,0 +1,22 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ *
+ * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
+ */
+
+#include <math_private.h>
+
+long double
+__ieee754_fmodl (long double x, long double y)
+{
+  long double res;
+
+  asm ("1:\tfprem\n"
+       "fstsw   %%ax\n"
+       "sahf\n"
+       "jp      1b\n"
+       "fstp    %%st(1)"
+       : "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)");
+  return res;
+}
============================================================
Index: sysdeps/i386/fpu/e_atan2l.c
--- sysdeps/i386/fpu/e_atan2l.c	created
+++ sysdeps/i386/fpu/e_atan2l.c	Sun May  6 13:59:12 2001	1.1
@@ -0,0 +1,18 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ *
+ * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
+ */
+
+#include <math_private.h>
+
+long double
+__ieee754_atan2l (long double y, long double x)
+{
+  long double res;
+
+  asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)");
+
+  return res;
+}
============================================================
Index: sysdeps/i386/fpu/e_fmodl.S
--- sysdeps/i386/fpu/e_fmodl.S	Wed Jul 14 01:22:08 1999	1.1
+++ sysdeps/i386/fpu/e_fmodl.S	removed
@@ -1,21 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#include <machine/asm.h>
-
-RCSID("$NetBSD: $")
-
-ENTRY(__ieee754_fmodl)
-	fldt	16(%esp)
-	fldt	4(%esp)
-1:	fprem
-	fstsw	%ax
-	sahf
-	jp	1b
-	fstp	%st(1)
-	ret
-END (__ieee754_fmodl)
============================================================
Index: sysdeps/i386/fpu/e_atan2l.S
--- sysdeps/i386/fpu/e_atan2l.S	Wed Jul 14 01:21:18 1999	1.1
+++ sysdeps/i386/fpu/e_atan2l.S	removed
@@ -1,17 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#include <machine/asm.h>
-
-RCSID("$NetBSD: $")
-
-ENTRY(__ieee754_atan2l)
-	fldt	 4(%esp)
-	fldt	16(%esp)
-	fpatan
-	ret
-END (__ieee754_atan2l)

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]