Module Name: src Committed By: christos Date: Thu Aug 25 12:29:15 UTC 2016
Modified Files: src/sys/arch/sh3/include: fenv.h ieeefp.h Log Message: fake some stuff for softfloat. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sh3/include/fenv.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sh3/include/ieeefp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sh3/include/fenv.h diff -u src/sys/arch/sh3/include/fenv.h:1.1 src/sys/arch/sh3/include/fenv.h:1.2 --- src/sys/arch/sh3/include/fenv.h:1.1 Thu Aug 25 08:14:10 2016 +++ src/sys/arch/sh3/include/fenv.h Thu Aug 25 08:29:14 2016 @@ -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) Index: src/sys/arch/sh3/include/ieeefp.h diff -u src/sys/arch/sh3/include/ieeefp.h:1.5 src/sys/arch/sh3/include/ieeefp.h:1.6 --- src/sys/arch/sh3/include/ieeefp.h:1.5 Thu Aug 25 08:19:42 2016 +++ src/sys/arch/sh3/include/ieeefp.h Thu Aug 25 08:29:14 2016 @@ -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;