Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/include fake some stuff for softfloat.



details:   https://anonhg.NetBSD.org/src/rev/39107fc297f1
branches:  trunk
changeset: 347418:39107fc297f1
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Aug 25 12:29:14 2016 +0000

description:
fake some stuff for softfloat.

diffstat:

 sys/arch/sh3/include/fenv.h   |  7 ++++---
 sys/arch/sh3/include/ieeefp.h |  6 +++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (48 lines):

diff -r 70ba898d5094 -r 39107fc297f1 sys/arch/sh3/include/fenv.h
--- a/sys/arch/sh3/include/fenv.h       Thu Aug 25 12:21:21 2016 +0000
+++ b/sys/arch/sh3/include/fenv.h       Thu Aug 25 12:29:14 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fenv.h,v 1.1 2016/08/25 12:14:10 christos Exp $        */
+/*     $NetBSD: fenv.h,v 1.2 2016/08/25 12:29:14 christos Exp $        */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -53,8 +53,9 @@
 /* Rounding modes, from FPSCR */
 #define FE_TONEAREST   FPSCR_ROUND_NEAREST
 #define        FE_TOWARDZERO   FPSCR_ROUND_ZERO
-/*     FE_DOWNWARD     */
-/*     FE_UPWARD       */
+/* These two don't exist and are only defined for the benefit of softfloat */
+#define        FE_DOWNWARD     (FPSCR_ROUND_ZERO + 1)
+#define        FE_UPWARD       (FPSCR_ROUND_ZERO + 2)
 
 #define _ROUND_MASK    \
     (FE_TONEAREST | FE_TOWARDZERO)
diff -r 70ba898d5094 -r 39107fc297f1 sys/arch/sh3/include/ieeefp.h
--- a/sys/arch/sh3/include/ieeefp.h     Thu Aug 25 12:21:21 2016 +0000
+++ b/sys/arch/sh3/include/ieeefp.h     Thu Aug 25 12:29:14 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieeefp.h,v 1.5 2016/08/25 12:19:42 christos Exp $ */
+/* $NetBSD: ieeefp.h,v 1.6 2016/08/25 12:29:14 christos Exp $ */
 
 /*
  * Written by J.T. Conklin, Apr 6, 1995
@@ -16,6 +16,8 @@
 
 #if defined(_NETBSD_SOURCE)
 
+typedef int fp_except;
+
 #define        FP_X_INV        FE_INVALID      /* invalid operation exception */
 #define        FP_X_DZ         FE_DIVBYZERO    /* divide-by-zero exception */
 #define        FP_X_OFL        FE_OVERFLOW     /* overflow exception */
@@ -24,6 +26,8 @@
 
 typedef enum {
        FP_RN=FE_TONEAREST,     /* round to nearest representable number */
+       FP_RM=FE_DOWNWARD,      /* round toward negative infinity */
+       FP_RP=FE_UPWARD,        /* round toward positive infinity */
        FP_RZ=FE_TOWARDZERO     /* round to zero (truncate) */
 } fp_rnd;
 



Home | Main Index | Thread Index | Old Index