Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/alpha/gen Complete rewrite. Call the new sysar...
details: https://anonhg.NetBSD.org/src/rev/7bf65f94d498
branches: trunk
changeset: 509086:7bf65f94d498
user: ross <ross%NetBSD.org@localhost>
date: Thu Apr 26 03:21:39 2001 +0000
description:
Complete rewrite. Call the new sysarch(ALPHA_FPGETSTICKY, ...).
diffstat:
lib/libc/arch/alpha/gen/fpgetsticky.c | 57 ++++++++++++++--------------------
1 files changed, 24 insertions(+), 33 deletions(-)
diffs (77 lines):
diff -r 3d878f71e224 -r 7bf65f94d498 lib/libc/arch/alpha/gen/fpgetsticky.c
--- a/lib/libc/arch/alpha/gen/fpgetsticky.c Thu Apr 26 03:19:10 2001 +0000
+++ b/lib/libc/arch/alpha/gen/fpgetsticky.c Thu Apr 26 03:21:39 2001 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: fpgetsticky.c,v 1.4 2000/06/14 17:24:58 cgd Exp $ */
+/* $NetBSD: fpgetsticky.c,v 1.5 2001/04/26 03:21:39 ross Exp $ */
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
+/*-
+ * Copyright (c) 2001 Ross Harvey
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -14,39 +14,30 @@
* 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 for the
- * NetBSD Project. See http://www.netbsd.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <ieeefp.h>
+#include <machine/sysarch.h>
fp_except
-fpgetsticky __P((void))
+fpgetsticky(void)
{
- double fpcrval;
- u_int64_t old;
-
- __asm__("trapb");
- __asm__("mf_fpcr %0" : "=f" (fpcrval));
- __asm__("trapb");
- old = *(u_int64_t *)&fpcrval;
-
- return (old >> 52) & 0x3f;
+ return sysarch(ALPHA_FPGETSTICKY, 0L);
}
Home |
Main Index |
Thread Index |
Old Index