Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/sh5/gen Add some missing FP support code.
details: https://anonhg.NetBSD.org/src/rev/dde529e56040
branches: trunk
changeset: 533873:dde529e56040
user: scw <scw%NetBSD.org@localhost>
date: Wed Jul 10 13:09:04 2002 +0000
description:
Add some missing FP support code.
diffstat:
lib/libc/arch/sh5/gen/Makefile.inc | 7 +++-
lib/libc/arch/sh5/gen/flt_rounds.S | 51 ++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 2 deletions(-)
diffs (73 lines):
diff -r bb54fc1273a1 -r dde529e56040 lib/libc/arch/sh5/gen/Makefile.inc
--- a/lib/libc/arch/sh5/gen/Makefile.inc Wed Jul 10 12:42:28 2002 +0000
+++ b/lib/libc/arch/sh5/gen/Makefile.inc Wed Jul 10 13:09:04 2002 +0000
@@ -1,9 +1,12 @@
-# $NetBSD: Makefile.inc,v 1.1 2002/07/05 13:31:29 scw Exp $
+# $NetBSD: Makefile.inc,v 1.2 2002/07/10 13:09:04 scw Exp $
SRCS+= alloca.S \
byte_swap_2.S byte_swap_4.S byte_swap_8.S \
- fabs.S \
+ fabs.S flt_rounds.S \
sigsetjmp.S _setjmp.S
+SRCS+= ieee754_frexp.c ieee754_infinity.c ieee754_isinf.c ieee754_isnan.c \
+ ieee754_ldexp.c ieee754_modf.c ieee754_nanf.c
+
LSRCS+= Lint_bswap16.c Lint_bswap32.c Lint_bswap64.c
DPSRCS+= Lint_bswap16.c Lint_bswap32.c Lint_bswap64.c
diff -r bb54fc1273a1 -r dde529e56040 lib/libc/arch/sh5/gen/flt_rounds.S
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/sh5/gen/flt_rounds.S Wed Jul 10 13:09:04 2002 +0000
@@ -0,0 +1,51 @@
+/* $NetBSD: flt_rounds.S,v 1.1 2002/07/10 13:09:04 scw Exp $ */
+
+/*
+ * Copyright 2002 Wasabi Systems, Inc.
+ * All rights reserved.
+ *
+ * Written by Steve C. Woodford for Wasabi Systems, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * 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 by
+ * Wasabi Systems, Inc.
+ * 4. The name of Wasabi Systems, Inc. may not be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
+ * 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 <machine/asm.h>
+
+/*
+ * Returns 0 for "round to zero", or 1 for "round to nearest".
+ * The SH5 FPU doesn't support "round to +- infinity".
+ */
+
+ENTRY(__flt_rounds)
+ fgetscr fr0
+ ptabs/l r18, tr0
+ fmov.sl fr0, r3
+ andi r3, 1, r3
+ xori r3, 1, r3
+ blink tr0, r63
Home |
Main Index |
Thread Index |
Old Index