Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/lib/libc/arch/alpha/gen pullup 1.1->1.2 (ross)



details:   https://anonhg.NetBSD.org/src/rev/f5a22208ebce
branches:  netbsd-1-4
changeset: 468571:f5a22208ebce
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Apr 30 15:07:07 1999 +0000

description:
pullup 1.1->1.2 (ross)

diffstat:

 lib/libc/arch/alpha/gen/fpgetmask.c   |  13 ++++++-------
 lib/libc/arch/alpha/gen/fpgetsticky.c |  15 +++++++++++----
 lib/libc/arch/alpha/gen/fpsetmask.c   |  12 +++++++-----
 lib/libc/arch/alpha/gen/fpsetsticky.c |  12 +++++++-----
 4 files changed, 31 insertions(+), 21 deletions(-)

diffs (147 lines):

diff -r b457f7c51763 -r f5a22208ebce lib/libc/arch/alpha/gen/fpgetmask.c
--- a/lib/libc/arch/alpha/gen/fpgetmask.c       Fri Apr 30 15:06:11 1999 +0000
+++ b/lib/libc/arch/alpha/gen/fpgetmask.c       Fri Apr 30 15:07:07 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: fpgetmask.c,v 1.1 1995/04/29 05:10:55 cgd Exp $        */
+/*     $NetBSD: fpgetmask.c,v 1.1.12.1 1999/04/30 15:07:07 perry Exp $ */
 
 /*
- * Copyright (c) 1995 Christopher G. Demetriou
+ * Copyright (c) 1999 Ross Harvey
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
  *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
+ *      This product includes software developed by Ross Harvey
  *     for the NetBSD Project.
  * 4. The name of the author may not be used to endorse or promote products
  *    derived from this software without specific prior written permission
@@ -32,11 +32,10 @@
  */
 
 #include <ieeefp.h>
+#include <machine/sysarch.h>
 
 fp_except
-fpgetmask()
+fpgetmask __P((void))
 {
-
-       /* XXX */
-       abort();
+       return sysarch(ALPHA_FPGETMASK, (void *)0);
 }
diff -r b457f7c51763 -r f5a22208ebce lib/libc/arch/alpha/gen/fpgetsticky.c
--- a/lib/libc/arch/alpha/gen/fpgetsticky.c     Fri Apr 30 15:06:11 1999 +0000
+++ b/lib/libc/arch/alpha/gen/fpgetsticky.c     Fri Apr 30 15:07:07 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpgetsticky.c,v 1.1 1995/04/29 05:10:59 cgd Exp $      */
+/*     $NetBSD: fpgetsticky.c,v 1.1.12.1 1999/04/30 15:07:07 perry Exp $       */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -31,12 +31,19 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/types.h>
 #include <ieeefp.h>
 
 fp_except
-fpgetsticky()
+fpgetsticky __P((void))
 {
+       double fpcrval;
+       u_int64_t old;
 
-       /* XXX */
-       abort();
+       __asm__("trapb");
+       __asm__("mf_fpcr %0" : "=f" (fpcrval));
+       __asm__("trapb");
+       old = *(u_int64_t *)&fpcrval;
+
+       return (old >> 52) & 0x3f;
 }
diff -r b457f7c51763 -r f5a22208ebce lib/libc/arch/alpha/gen/fpsetmask.c
--- a/lib/libc/arch/alpha/gen/fpsetmask.c       Fri Apr 30 15:06:11 1999 +0000
+++ b/lib/libc/arch/alpha/gen/fpsetmask.c       Fri Apr 30 15:07:07 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: fpsetmask.c,v 1.1 1995/04/29 05:11:01 cgd Exp $        */
+/*     $NetBSD: fpsetmask.c,v 1.1.12.1 1999/04/30 15:07:07 perry Exp $ */
 
 /*
- * Copyright (c) 1995 Christopher G. Demetriou
+ * Copyright (c) 1995 Ross Harvey
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
  *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
+ *      This product includes software developed by Ross Harvey
  *     for the NetBSD Project.
  * 4. The name of the author may not be used to endorse or promote products
  *    derived from this software without specific prior written permission
@@ -32,12 +32,14 @@
  */
 
 #include <ieeefp.h>
+#include <machine/sysarch.h>
 
 fp_except
 fpsetmask(mask)
        fp_except mask;
 {
+       struct alpha_fp_except_args a;
 
-       /* XXX */
-       abort();
+       a.mask = mask;
+       return sysarch(ALPHA_FPSETMASK, &a);
 }
diff -r b457f7c51763 -r f5a22208ebce lib/libc/arch/alpha/gen/fpsetsticky.c
--- a/lib/libc/arch/alpha/gen/fpsetsticky.c     Fri Apr 30 15:06:11 1999 +0000
+++ b/lib/libc/arch/alpha/gen/fpsetsticky.c     Fri Apr 30 15:07:07 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: fpsetsticky.c,v 1.1 1995/04/29 05:11:04 cgd Exp $      */
+/*     $NetBSD: fpsetsticky.c,v 1.1.12.1 1999/04/30 15:07:08 perry Exp $       */
 
 /*
- * Copyright (c) 1995 Christopher G. Demetriou
+ * Copyright (c) 1999 Ross Harvey
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
  *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
+ *      This product includes software developed by Ross Harvey
  *     for the NetBSD Project.
  * 4. The name of the author may not be used to endorse or promote products
  *    derived from this software without specific prior written permission
@@ -32,12 +32,14 @@
  */
 
 #include <ieeefp.h>
+#include <machine/sysarch.h>
 
 fp_except
 fpsetsticky(sticky)
        fp_except sticky;
 {
+       struct alpha_fp_except_args a;
 
-       /* XXX */
-       abort();
+       a.mask = sticky;
+       return sysarch(ALPHA_FPSETSTICKY, &a);
 }



Home | Main Index | Thread Index | Old Index