CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Thu Jan 10 08:16:11 UTC 2013 Modified Files: src/lib/libc/softfloat: fpsetmask.c fpsetround.c fpsetsticky.c softfloat-specialize src/lib/libc/softfloat/bits32: softfloat.c src/lib/libc/softfloat/bits64: softfloat.c Log Message: Add hooks to softfloat to support per-lwp exception state. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/softfloat/fpsetmask.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/softfloat/fpsetround.c \ src/lib/libc/softfloat/fpsetsticky.c cvs rdiff -u -r1.7 -r1.8 src/lib/libc/softfloat/softfloat-specialize cvs rdiff -u -r1.2 -r1.3 src/lib/libc/softfloat/bits32/softfloat.c cvs rdiff -u -r1.11 -r1.12 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/fpsetmask.c diff -u src/lib/libc/softfloat/fpsetmask.c:1.4 src/lib/libc/softfloat/fpsetmask.c:1.5 --- src/lib/libc/softfloat/fpsetmask.c:1.4 Mon Apr 28 20:23:00 2008 +++ src/lib/libc/softfloat/fpsetmask.c Thu Jan 10 08:16:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.5 2013/01/10 08:16:10 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.5 2013/01/10 08:16:10 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -50,9 +50,11 @@ __weak_alias(fpsetmask,_fpsetmask) fp_except fpsetmask(fp_except mask) { - fp_except old; - - old = float_exception_mask; +#ifdef set_float_exception_mask + return set_float_exception_mask(mask); +#else + const fp_except old = float_exception_mask; float_exception_mask = mask; return old; +#endif } Index: src/lib/libc/softfloat/fpsetround.c diff -u src/lib/libc/softfloat/fpsetround.c:1.3 src/lib/libc/softfloat/fpsetround.c:1.4 --- src/lib/libc/softfloat/fpsetround.c:1.3 Mon Apr 28 20:23:00 2008 +++ src/lib/libc/softfloat/fpsetround.c Thu Jan 10 08:16:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetround.c,v 1.3 2008/04/28 20:23:00 martin Exp $ */ +/* $NetBSD: fpsetround.c,v 1.4 2013/01/10 08:16:10 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetround.c,v 1.3 2008/04/28 20:23:00 martin Exp $"); +__RCSID("$NetBSD: fpsetround.c,v 1.4 2013/01/10 08:16:10 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -50,9 +50,11 @@ __weak_alias(fpsetround,_fpsetround) fp_rnd fpsetround(fp_rnd rnd_dir) { - fp_rnd old; - - old = float_rounding_mode; +#ifdef set_float_rounding_mode + return set_float_rounding_mode(rnd_dir); +#else + const fp_rnd old = float_rounding_mode; float_rounding_mode = rnd_dir; return old; +#endif } Index: src/lib/libc/softfloat/fpsetsticky.c diff -u src/lib/libc/softfloat/fpsetsticky.c:1.3 src/lib/libc/softfloat/fpsetsticky.c:1.4 --- src/lib/libc/softfloat/fpsetsticky.c:1.3 Mon Apr 28 20:23:00 2008 +++ src/lib/libc/softfloat/fpsetsticky.c Thu Jan 10 08:16:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetsticky.c,v 1.3 2008/04/28 20:23:00 martin Exp $ */ +/* $NetBSD: fpsetsticky.c,v 1.4 2013/01/10 08:16:10 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetsticky.c,v 1.3 2008/04/28 20:23:00 martin Exp $"); +__RCSID("$NetBSD: fpsetsticky.c,v 1.4 2013/01/10 08:16:10 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -50,9 +50,11 @@ __weak_alias(fpsetsticky,_fpsetsticky) fp_except fpsetsticky(fp_except except) { - fp_except old; - - old = float_exception_flags; +#ifdef set_float_exception_flags + return set_float_exception_flags(except, 1); +#else + const fp_except old = float_exception_flags; float_exception_flags = except; return old; +#endif } Index: src/lib/libc/softfloat/softfloat-specialize diff -u src/lib/libc/softfloat/softfloat-specialize:1.7 src/lib/libc/softfloat/softfloat-specialize:1.8 --- src/lib/libc/softfloat/softfloat-specialize:1.7 Wed Mar 21 02:32:26 2012 +++ src/lib/libc/softfloat/softfloat-specialize Thu Jan 10 08:16:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-specialize,v 1.7 2012/03/21 02:32:26 christos Exp $ */ +/* $NetBSD: softfloat-specialize,v 1.8 2013/01/10 08:16:10 matt Exp $ */ /* This is a derivative work. */ @@ -56,16 +56,28 @@ should be simply `float_exception_flags --- */ #ifdef SOFTFLOAT_FOR_GCC +#ifndef set_float_exception_mask #define float_exception_mask _softfloat_float_exception_mask #endif +#endif +#ifndef set_float_exce
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Thu Aug 1 22:18:50 UTC 2013 Modified Files: src/lib/libc/softfloat: softfloat-for-gcc.h Log Message: Make sure to if we are doing using EABI. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/softfloat/softfloat-for-gcc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/softfloat-for-gcc.h diff -u src/lib/libc/softfloat/softfloat-for-gcc.h:1.10 src/lib/libc/softfloat/softfloat-for-gcc.h:1.11 --- src/lib/libc/softfloat/softfloat-for-gcc.h:1.10 Tue Apr 16 10:54:53 2013 +++ src/lib/libc/softfloat/softfloat-for-gcc.h Thu Aug 1 22:18:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-for-gcc.h,v 1.10 2013/04/16 10:54:53 matt Exp $ */ +/* $NetBSD: softfloat-for-gcc.h,v 1.11 2013/08/01 22:18:50 matt Exp $ */ /* * Move private identifiers with external linkage into implementation @@ -169,6 +169,7 @@ #endif #ifdef __ARM_EABI__ +#include #define __addsf3 __aeabi_fadd #define __adddf3 __aeabi_dadd
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Thu Aug 1 23:21:19 UTC 2013 Modified Files: src/lib/libc/softfloat: softfloat-for-gcc.h Log Message: Only include when __ARM_PCS_VFP is defined. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/softfloat/softfloat-for-gcc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/softfloat-for-gcc.h diff -u src/lib/libc/softfloat/softfloat-for-gcc.h:1.11 src/lib/libc/softfloat/softfloat-for-gcc.h:1.12 --- src/lib/libc/softfloat/softfloat-for-gcc.h:1.11 Thu Aug 1 22:18:50 2013 +++ src/lib/libc/softfloat/softfloat-for-gcc.h Thu Aug 1 23:21:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-for-gcc.h,v 1.11 2013/08/01 22:18:50 matt Exp $ */ +/* $NetBSD: softfloat-for-gcc.h,v 1.12 2013/08/01 23:21:19 matt Exp $ */ /* * Move private identifiers with external linkage into implementation @@ -169,7 +169,9 @@ #endif #ifdef __ARM_EABI__ +#ifdef __ARM_PCS_VFP #include +#endif #define __addsf3 __aeabi_fadd #define __adddf3 __aeabi_dadd
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: christos Date: Wed Mar 21 02:32:27 UTC 2012 Modified Files: src/lib/libc/softfloat: softfloat-specialize src/lib/libc/softfloat/bits64: softfloat-macros softfloat.c Log Message: cast to appropriate types. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/softfloat/softfloat-specialize cvs rdiff -u -r1.2 -r1.3 src/lib/libc/softfloat/bits64/softfloat-macros cvs rdiff -u -r1.9 -r1.10 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/softfloat-specialize diff -u src/lib/libc/softfloat/softfloat-specialize:1.6 src/lib/libc/softfloat/softfloat-specialize:1.7 --- src/lib/libc/softfloat/softfloat-specialize:1.6 Sun Mar 6 05:27:37 2011 +++ src/lib/libc/softfloat/softfloat-specialize Tue Mar 20 22:32:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-specialize,v 1.6 2011/03/06 10:27:37 martin Exp $ */ +/* $NetBSD: softfloat-specialize,v 1.7 2012/03/21 02:32:26 christos Exp $ */ /* This is a derivative work. */ @@ -114,7 +114,7 @@ static flag float32_is_nan( float32 a ) { -return ( 0xFF00 < (bits32) ( a<<1 ) ); +return ( (bits32)0xFF00 < (bits32) ( a<<1 ) ); } @@ -163,7 +163,7 @@ precision floating-point format. static float32 commonNaNToFloat32( commonNaNT a ) { -return ( ( (bits32) a.sign )<<31 ) | 0x7FC0 | ( a.high>>41 ); +return ( ( (bits32) a.sign )<<31 ) | 0x7FC0 | (bits32)( a.high>>41 ); } @@ -213,7 +213,7 @@ static flag float64_is_nan( float64 a ) { -return ( LIT64( 0xFFE0 ) < +return ( (bits64)LIT64( 0xFFE0 ) < (bits64) ( FLOAT64_DEMANGLE(a)<<1 ) ); } @@ -249,7 +249,7 @@ static commonNaNT float64ToCommonNaN( fl commonNaNT z; if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -z.sign = FLOAT64_DEMANGLE(a)>>63; +z.sign = (flag)(FLOAT64_DEMANGLE(a)>>63); z.low = 0; z.high = FLOAT64_DEMANGLE(a)<<12; return z; @@ -427,7 +427,7 @@ flag float128_is_nan( float128 a ) { return - ( LIT64( 0xFFFE ) <= (bits64) ( a.high<<1 ) ) + ( (bits64)LIT64( 0xFFFE ) <= (bits64) ( a.high<<1 ) ) && ( a.low || ( a.high & LIT64( 0x ) ) ); } @@ -459,7 +459,7 @@ static commonNaNT float128ToCommonNaN( f commonNaNT z; if ( float128_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); -z.sign = a.high>>63; +z.sign = (flag)(a.high>>63); shortShift128Left( a.high, a.low, 16, &z.high, &z.low ); return z; Index: src/lib/libc/softfloat/bits64/softfloat-macros diff -u src/lib/libc/softfloat/bits64/softfloat-macros:1.2 src/lib/libc/softfloat/bits64/softfloat-macros:1.3 --- src/lib/libc/softfloat/bits64/softfloat-macros:1.2 Mon Feb 16 05:23:35 2009 +++ src/lib/libc/softfloat/bits64/softfloat-macros Tue Mar 20 22:32:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-macros,v 1.2 2009/02/16 10:23:35 tron Exp $ */ +/* $NetBSD: softfloat-macros,v 1.3 2012/03/21 02:32:26 christos Exp $ */ /* === @@ -464,10 +464,10 @@ INLINE void mul64To128( bits64 a, bits64 bits32 aHigh, aLow, bHigh, bLow; bits64 z0, zMiddleA, zMiddleB, z1; -aLow = a; -aHigh = a>>32; -bLow = b; -bHigh = b>>32; +aLow = (bits32)a; +aHigh = (bits32)(a>>32); +bLow = (bits32)b; +bHigh = (bits32)(b>>32); z1 = ( (bits64) aLow ) * bLow; zMiddleA = ( (bits64) aLow ) * bHigh; zMiddleB = ( (bits64) aHigh ) * bLow; @@ -616,7 +616,7 @@ static bits32 estimateSqrt32( int16 aExp z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ idx ]; z = a / z + z; z = ( 0x2 <= z ) ? 0x8000 : ( z<<15 ); -if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 ); +if ( z <= a ) return (bits32) ( ( (bits32) a )>>1 ); } return ( (bits32) ( ( ( (bits64) a )<<31 ) / z ) ) + ( z>>1 ); @@ -682,7 +682,7 @@ static int8 countLeadingZeros64( bits64 else { a >>= 32; } -shiftCount += countLeadingZeros32( a ); +shiftCount += (int8)countLeadingZeros32( (bits32)a ); return shiftCount; } Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.9 src/lib/libc/softfloat/bits64/softfloat.c:1.10 --- src/lib/libc/softfloat/bits64/softfloat.c:1.9 Tue Mar 20 17:34:51 2012 +++ src/lib/libc/softfloat/bits64/softfloat.c Tue Mar 20 22:32:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.9 2012/03/20 21:34:51 martin Exp $ */ +/* $NetBSD: softfloat.c,v 1.10 2012/03/21 02:32:26 christos Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: msaitoh Date: Wed Nov 14 03:47:31 UTC 2012 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: For arm, add -fno-tree-vrp to COPTS when compiling softfloat.c. Without -fno-tree-vrp, -INF + -INF returns 0 by adddf3. Fixes PR#46953. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.10 src/lib/libc/softfloat/Makefile.inc:1.11 --- src/lib/libc/softfloat/Makefile.inc:1.10 Mon Jul 4 02:53:15 2011 +++ src/lib/libc/softfloat/Makefile.inc Wed Nov 14 03:47:30 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.10 2011/07/04 02:53:15 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.11 2012/11/14 03:47:30 msaitoh Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -20,9 +20,13 @@ SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c SRCS+= ${SRCS.softfloat} # XXX -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && \ -(${MACHINE_CPU} == "arm" || \ - ${MACHINE_CPU} == "mips" || \ +.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 +.if (${MACHINE_CPU} == "arm") +# See doc/HACKS for more information. +COPTS.softfloat.c+= -Wno-enum-compare -fno-tree-vrp +.elif +(${MACHINE_CPU} == "mips" || \ ${MACHINE_CPU} == "sh3") COPTS.softfloat.c+= -Wno-enum-compare .endif +.endif
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: he Date: Fri Nov 16 12:38:10 UTC 2012 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: Fix make syntax problem by putting the condition on the same line as .elif. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.11 src/lib/libc/softfloat/Makefile.inc:1.12 --- src/lib/libc/softfloat/Makefile.inc:1.11 Wed Nov 14 03:47:30 2012 +++ src/lib/libc/softfloat/Makefile.inc Fri Nov 16 12:38:09 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2012/11/14 03:47:30 msaitoh Exp $ +# $NetBSD: Makefile.inc,v 1.12 2012/11/16 12:38:09 he Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -24,8 +24,7 @@ SRCS+= ${SRCS.softfloat} .if (${MACHINE_CPU} == "arm") # See doc/HACKS for more information. COPTS.softfloat.c+= -Wno-enum-compare -fno-tree-vrp -.elif -(${MACHINE_CPU} == "mips" || \ +.elif (${MACHINE_CPU} == "mips" || \ ${MACHINE_CPU} == "sh3") COPTS.softfloat.c+= -Wno-enum-compare .endif
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Sun Aug 5 04:27:42 UTC 2012 Modified Files: src/lib/libc/softfloat: softfloat-for-gcc.h Log Message: ARM EABI (AAPCS) uses different names for the softfloat routines that the normal GCC ones. So after we redefine softfloat's to be what (old) GCC wants, we redefined the old GCC names to what ARM EABI want (but only if we are using ARM EABI). We do this for routines not compiled by softfloat so can just have these redefinitions in one place. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/softfloat/softfloat-for-gcc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/softfloat-for-gcc.h diff -u src/lib/libc/softfloat/softfloat-for-gcc.h:1.8 src/lib/libc/softfloat/softfloat-for-gcc.h:1.9 --- src/lib/libc/softfloat/softfloat-for-gcc.h:1.8 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/softfloat/softfloat-for-gcc.h Sun Aug 5 04:27:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-for-gcc.h,v 1.8 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: softfloat-for-gcc.h,v 1.9 2012/08/05 04:27:42 matt Exp $ */ /* * Move private identifiers with external linkage into implementation @@ -167,3 +167,60 @@ #define float128_le __letf2 #define float128_gt __gttf2 #endif + +#ifdef __ARM_EABI__ +#define __addsf3 __aeabi_fadd +#define __adddf3 __aeabi_dadd + +#define __subsf3 __aeabi_fsub +#define __subdf3 __aeabi_dsub + +#define __mulsf3 __aeabi_fmul +#define __muldf3 __aeabi_dmul + +#define __divsf3 __aeabi_fdiv +#define __divdf3 __aeabi_ddiv + +#define __floatsisf __aeabi_i2f +#define __floatsidf __aeabi_i2d + +#define __floatdisf __aeabi_l2f +#define __floatdidf __aeabi_l2d + +#define __floatunsisf __aeabi_ui2f +#define __floatunsidf __aeabi_ui2d + +#define __floatundisf __aeabi_ul2f +#define __floatundidf __aeabi_ul2d + +#define __fixsfsi __aeabi_f2iz +#define __fixdfsi __aeabi_d2iz + +#define __fixsfdi __aeabi_f2lz +#define __fixdfdi __aeabi_d2lz + +#define __fixunssfsi __aeabi_f2uiz +#define __fixunsdfsi __aeabi_d2uiz + +#define __fixunssfdi __aeabi_f2ulz +#define __fixunsdfdi __aeabi_d2ulz + +#define __extendsfdf2 __aeabi_f2d +#define __truncdfsf2 __aeabi_d2f + +#define __eqsf2__aeabi_fcmpeq +#define __eqdf2__aeabi_dcmpeq + +#define __ltsf2__aeabi_fcmplt +#define __ltdf2__aeabi_dcmplt + +#define __lesf2__aeabi_fcmple +#define __ledf2__aeabi_dcmple + +#define __gtsf2__aeabi_fcmpgt +#define __gtdf2__aeabi_dcmpgt + +#define __gesf2__aeabi_fcmpge +#define __gedf2__aeabi_dcmpge + +#endif /* __ARM_EABI__ */
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: joerg Date: Thu Dec 19 22:20:01 UTC 2013 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: Only apply -fno-tree-vrp for GCC. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.15 src/lib/libc/softfloat/Makefile.inc:1.16 --- src/lib/libc/softfloat/Makefile.inc:1.15 Tue Apr 30 01:42:04 2013 +++ src/lib/libc/softfloat/Makefile.inc Thu Dec 19 22:20:01 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.15 2013/04/30 01:42:04 matt Exp $ +# $NetBSD: Makefile.inc,v 1.16 2013/12/19 22:20:01 joerg Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -32,7 +32,8 @@ SRCS+= ${SRCS.softfloat} .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 .if (${MACHINE_CPU} == "arm") # See doc/HACKS for more information. -COPTS.softfloat.c+= -Wno-enum-compare -fno-tree-vrp +COPTS.softfloat.c+= -Wno-enum-compare +COPTS.softfloat.c+= ${${ACTIVE_CXX} == "gcc":? -fno-tree-vrp :} .elif (${MACHINE_CPU} == "mips" || \ ${MACHINE_CPU} == "sh3") COPTS.softfloat.c+= -Wno-enum-compare
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: mrg Date: Sun Jul 3 15:26:58 UTC 2011 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: mips wants some -Wno-enum-compare here, too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.8 src/lib/libc/softfloat/Makefile.inc:1.9 --- src/lib/libc/softfloat/Makefile.inc:1.8 Fri Jul 1 01:25:52 2011 +++ src/lib/libc/softfloat/Makefile.inc Sun Jul 3 15:26:58 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.8 2011/07/01 01:25:52 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.9 2011/07/03 15:26:58 mrg Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -21,6 +21,7 @@ # XXX .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && \ -(${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb") +(${MACHINE_CPU} == "arm" || \ + ${MACHINE_CPU} == "mips") COPTS.softfloat.c+= -Wno-enum-compare .endif
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: mrg Date: Mon Jul 4 02:53:15 UTC 2011 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: sh3 also needs -Wno-enum-compare here. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.9 src/lib/libc/softfloat/Makefile.inc:1.10 --- src/lib/libc/softfloat/Makefile.inc:1.9 Sun Jul 3 15:26:58 2011 +++ src/lib/libc/softfloat/Makefile.inc Mon Jul 4 02:53:15 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.9 2011/07/03 15:26:58 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.10 2011/07/04 02:53:15 mrg Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -22,6 +22,7 @@ # XXX .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && \ (${MACHINE_CPU} == "arm" || \ - ${MACHINE_CPU} == "mips") + ${MACHINE_CPU} == "mips" || \ + ${MACHINE_CPU} == "sh3") COPTS.softfloat.c+= -Wno-enum-compare .endif
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: martin Date: Fri Mar 4 11:48:58 UTC 2011 Modified Files: src/lib/libc/softfloat: softfloat-specialize Log Message: Use sigqueueinfo() instead of raise() to generate exceptions. Provide minimalistic siginfo data. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/softfloat/softfloat-specialize Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/softfloat-specialize diff -u src/lib/libc/softfloat/softfloat-specialize:1.4 src/lib/libc/softfloat/softfloat-specialize:1.5 --- src/lib/libc/softfloat/softfloat-specialize:1.4 Sun Sep 26 21:13:27 2004 +++ src/lib/libc/softfloat/softfloat-specialize Fri Mar 4 11:48:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-specialize,v 1.4 2004/09/26 21:13:27 jmmv Exp $ */ +/* $NetBSD: softfloat-specialize,v 1.5 2011/03/04 11:48:58 martin Exp $ */ /* This is a derivative work. */ @@ -33,6 +33,8 @@ */ #include +#include +#include /* --- @@ -56,11 +58,26 @@ fp_except float_exception_mask = 0; void float_raise( fp_except flags ) { +siginfo_t info; float_exception_flags |= flags; if ( flags & float_exception_mask ) { - raise( SIGFPE ); + memset(&info, 0, sizeof info); + info.si_signo = SIGFPE; + info.si_pid = getpid(); + info.si_uid = geteuid(); + if (flags & float_flag_underflow) + info.si_code = FPE_FLTUND; + else if (flags & float_flag_overflow) + info.si_code = FPE_FLTOVF; + else if (flags & float_flag_divbyzero) + info.si_code = FPE_FLTDIV; + else if (flags & float_flag_invalid) + info.si_code = FPE_FLTINV; + else if (flags & float_flag_inexact) + info.si_code = FPE_FLTRES; + sigqueueinfo(getpid(), &info); } }
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: martin Date: Sun Mar 6 10:27:37 UTC 2011 Modified Files: src/lib/libc/softfloat: softfloat-specialize Log Message: Apply local namespace protection equivalent to the weak alias done in softfloat-for-gcc.h, which we can't include here, to move "float_exception_mask" into implementation namespace. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/softfloat/softfloat-specialize Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/softfloat-specialize diff -u src/lib/libc/softfloat/softfloat-specialize:1.5 src/lib/libc/softfloat/softfloat-specialize:1.6 --- src/lib/libc/softfloat/softfloat-specialize:1.5 Fri Mar 4 11:48:58 2011 +++ src/lib/libc/softfloat/softfloat-specialize Sun Mar 6 10:27:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-specialize,v 1.5 2011/03/04 11:48:58 martin Exp $ */ +/* $NetBSD: softfloat-specialize,v 1.6 2011/03/06 10:27:37 martin Exp $ */ /* This is a derivative work. */ @@ -55,6 +55,9 @@ should be simply `float_exception_flags |= flags;'. --- */ +#ifdef SOFTFLOAT_FOR_GCC +#define float_exception_mask _softfloat_float_exception_mask +#endif fp_except float_exception_mask = 0; void float_raise( fp_except flags ) { @@ -80,6 +83,7 @@ sigqueueinfo(getpid(), &info); } } +#undef float_exception_mask /* ---
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Mon Jan 17 10:08:35 UTC 2011 Modified Files: src/lib/libc/softfloat: Makefile.inc Added Files: src/lib/libc/softfloat: eqtf2.c getf2.c gttf2.c letf2.c lttf2.c negtf2.c netf2.c Log Message: Add long double functions for eq,ne,gt,le,ge,lt,neg ops. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/softfloat/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/softfloat/eqtf2.c \ src/lib/libc/softfloat/getf2.c src/lib/libc/softfloat/gttf2.c \ src/lib/libc/softfloat/letf2.c src/lib/libc/softfloat/lttf2.c \ src/lib/libc/softfloat/negtf2.c src/lib/libc/softfloat/netf2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.6 src/lib/libc/softfloat/Makefile.inc:1.7 --- src/lib/libc/softfloat/Makefile.inc:1.6 Sun Dec 6 11:16:26 2009 +++ src/lib/libc/softfloat/Makefile.inc Mon Jan 17 10:08:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.6 2009/12/06 11:16:26 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.7 2011/01/17 10:08:35 matt Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -14,6 +14,7 @@ SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \ eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \ + eqtf2.c netf2.c gttf2.c getf2.c lttf2.c letf2.c negtf2.c \ nexf2.c gtxf2.c gexf2.c negxf2.c unordsf2.c unorddf2.c SRCS+= ${SRCS.softfloat} Added files: Index: src/lib/libc/softfloat/eqtf2.c diff -u /dev/null src/lib/libc/softfloat/eqtf2.c:1.1 --- /dev/null Mon Jan 17 10:08:35 2011 +++ src/lib/libc/softfloat/eqtf2.c Mon Jan 17 10:08:35 2011 @@ -0,0 +1,26 @@ +/* $NetBSD: eqtf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */ + +/* + * Written by Matt Thomas, 2011. This file is in the Public Domain. + */ + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: eqtf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#ifdef FLOAT128 +flag __eqtf2(float128, float128); + +flag +__eqtf2(float128 a, float128 b) +{ + + /* libgcc1.c says !(a == b) */ + return !float128_eq(a, b); +} +#endif /* FLOAT128 */ Index: src/lib/libc/softfloat/getf2.c diff -u /dev/null src/lib/libc/softfloat/getf2.c:1.1 --- /dev/null Mon Jan 17 10:08:35 2011 +++ src/lib/libc/softfloat/getf2.c Mon Jan 17 10:08:35 2011 @@ -0,0 +1,28 @@ +/* $NetBSD: getf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */ + +/* + * Written by Matt Thomas, 2011. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: getf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#ifdef FLOAT128 + +flag __getf2(float128, float128); + +flag +__getf2(float128 a, float128 b) +{ + + /* libgcc1.c says (a >= b) - 1 */ + return float128_le(b, a) - 1; +} + +#endif /* FLOAT128 */ Index: src/lib/libc/softfloat/gttf2.c diff -u /dev/null src/lib/libc/softfloat/gttf2.c:1.1 --- /dev/null Mon Jan 17 10:08:35 2011 +++ src/lib/libc/softfloat/gttf2.c Mon Jan 17 10:08:35 2011 @@ -0,0 +1,28 @@ +/* $NetBSD: gttf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */ + +/* + * Written by Matt Thomas, 2011. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: gttf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#ifdef FLOAT128 + +flag __gttf2(float128, float128); + +flag +__gttf2(float128 a, float128 b) +{ + + /* libgcc1.c says a > b */ + return float128_lt(b, a); +} + +#endif /* FLOAT128 */ Index: src/lib/libc/softfloat/letf2.c diff -u /dev/null src/lib/libc/softfloat/letf2.c:1.1 --- /dev/null Mon Jan 17 10:08:35 2011 +++ src/lib/libc/softfloat/letf2.c Mon Jan 17 10:08:35 2011 @@ -0,0 +1,28 @@ +/* $NetBSD: letf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */ + +/* + * Written by Matt Thomas, 2011. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: letf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#ifdef FLOAT128 + +flag __letf2(float128, float128); + +flag +__letf2(float128 a, float128 b) +{ + + /* libgcc1.c says 1 - (a <= b) */ + return 1 - float128_le(a, b); +} + +#endif /* FLOAT128 */ Index: src/lib/libc/softfloat/lttf2.c diff -u /dev/null src/lib/libc/softfloat/lttf2.c:1.1 --- /dev/null Mon Jan 17 10:08:35 2011 +++ src/lib/libc/softfloat/lttf2.c Mon Jan 17 10:08:35 2011 @@ -0,0 +1,28 @@ +/* $NetBSD: lttf2.c,v 1.1 2011/01/17 10:08:35 matt Exp $ */ + +/* +
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: uebayasi Date: Sun Dec 6 11:16:26 UTC 2009 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: Fix typo in previous. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.5 src/lib/libc/softfloat/Makefile.inc:1.6 --- src/lib/libc/softfloat/Makefile.inc:1.5 Sun Dec 6 05:34:42 2009 +++ src/lib/libc/softfloat/Makefile.inc Sun Dec 6 11:16:26 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 2009/12/06 05:34:42 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.6 2009/12/06 11:16:26 uebayasi Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -9,10 +9,10 @@ SRCS.softfloat= softfloat.c -SRCS.softfloat+=fpsetround.c fpgetmask.c fpsetmask.c \ +SRCS.softfloat+=fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \ fpgetsticky.c fpsetsticky.c -SRCS.softfloat+=nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \ +SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \ eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \ nexf2.c gtxf2.c gexf2.c negxf2.c unordsf2.c unorddf2.c
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Thu Jan 30 19:06:54 UTC 2014 Added Files: src/lib/libc/softfloat: unordtf2.c Log Message: unord for float128 long double To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/softfloat/unordtf2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/softfloat/unordtf2.c diff -u /dev/null src/lib/libc/softfloat/unordtf2.c:1.1 --- /dev/null Thu Jan 30 19:06:54 2014 +++ src/lib/libc/softfloat/unordtf2.c Thu Jan 30 19:06:54 2014 @@ -0,0 +1,28 @@ +/* $NetBSD: unordtf2.c,v 1.1 2014/01/30 19:06:54 matt Exp $ */ + +/* + * Written by Richard Earnshaw, 2003. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: unordtf2.c,v 1.1 2014/01/30 19:06:54 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +flag __unordtf2(float128, float128); + +flag +__unordtf2(float128 a, float128 b) +{ + /* + * The comparison is unordered if either input is a NaN. + * Test for this by comparing each operand with itself. + * We must perform both comparisons to correctly check for + * signalling NaNs. + */ + return 1 ^ (float128_eq(a, a) & float128_eq(b, b)); +}
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Thu Jan 30 19:11:54 UTC 2014 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: Add unordtf2.c To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.16 src/lib/libc/softfloat/Makefile.inc:1.17 --- src/lib/libc/softfloat/Makefile.inc:1.16 Thu Dec 19 22:20:01 2013 +++ src/lib/libc/softfloat/Makefile.inc Thu Jan 30 19:11:54 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.16 2013/12/19 22:20:01 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.17 2014/01/30 19:11:54 matt Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -23,7 +23,8 @@ SRCS.softfloat+=__aeabi_dcmpun.c __aeabi SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \ eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \ eqtf2.c netf2.c gttf2.c getf2.c lttf2.c letf2.c negtf2.c \ - nexf2.c gtxf2.c gexf2.c negxf2.c unordsf2.c unorddf2.c + nexf2.c gtxf2.c gexf2.c negxf2.c \ + unordsf2.c unorddf2.c unordtf2.c .endif SRCS+= ${SRCS.softfloat}
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Thu Jan 30 19:11:41 UTC 2014 Modified Files: src/lib/libc/softfloat: unordtf2.c Log Message: Make confiditon on FLOAT128 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/softfloat/unordtf2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/unordtf2.c diff -u src/lib/libc/softfloat/unordtf2.c:1.1 src/lib/libc/softfloat/unordtf2.c:1.2 --- src/lib/libc/softfloat/unordtf2.c:1.1 Thu Jan 30 19:06:54 2014 +++ src/lib/libc/softfloat/unordtf2.c Thu Jan 30 19:11:41 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: unordtf2.c,v 1.1 2014/01/30 19:06:54 matt Exp $ */ +/* $NetBSD: unordtf2.c,v 1.2 2014/01/30 19:11:41 matt Exp $ */ /* * Written by Richard Earnshaw, 2003. This file is in the Public Domain. @@ -10,9 +10,11 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: unordtf2.c,v 1.1 2014/01/30 19:06:54 matt Exp $"); +__RCSID("$NetBSD: unordtf2.c,v 1.2 2014/01/30 19:11:41 matt Exp $"); #endif /* LIBC_SCCS and not lint */ +#ifdef FLOAT128 + flag __unordtf2(float128, float128); flag @@ -26,3 +28,5 @@ __unordtf2(float128 a, float128 b) */ return 1 ^ (float128_eq(a, a) & float128_eq(b, b)); } + +#endif /* FLOAT128 */
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: martin Date: Wed Apr 8 13:16:37 UTC 2015 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: Restrict the arm compiler optimization hack to gcc 4.5 To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.19 src/lib/libc/softfloat/Makefile.inc:1.20 --- src/lib/libc/softfloat/Makefile.inc:1.19 Sun Aug 10 23:39:08 2014 +++ src/lib/libc/softfloat/Makefile.inc Wed Apr 8 13:16:37 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.19 2014/08/10 23:39:08 matt Exp $ +# $NetBSD: Makefile.inc,v 1.20 2015/04/08 13:16:37 martin Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -31,7 +31,7 @@ SRCS+= ${SRCS.softfloat} # XXX .if defined(HAVE_GCC) -. if (${LIBC_MACHINE_CPU} == "arm") +. if (${LIBC_MACHINE_CPU} == "arm") && (${HAVE_GCC} == "45") # See doc/HACKS for more information. COPTS.softfloat.c+= -Wno-enum-compare COPTS.softfloat.c+= ${${ACTIVE_CXX} == "gcc":? -fno-tree-vrp :}
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Tue Apr 16 10:54:53 UTC 2013 Modified Files: src/lib/libc/softfloat: Makefile.inc softfloat-for-gcc.h Log Message: ARM EABI needs different floating point comparision functions. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/softfloat/Makefile.inc cvs rdiff -u -r1.9 -r1.10 src/lib/libc/softfloat/softfloat-for-gcc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.12 src/lib/libc/softfloat/Makefile.inc:1.13 --- src/lib/libc/softfloat/Makefile.inc:1.12 Fri Nov 16 12:38:09 2012 +++ src/lib/libc/softfloat/Makefile.inc Tue Apr 16 10:54:53 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.12 2012/11/16 12:38:09 he Exp $ +# $NetBSD: Makefile.inc,v 1.13 2013/04/16 10:54:53 matt Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -12,10 +12,19 @@ SRCS.softfloat= softfloat.c SRCS.softfloat+=fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \ fpgetsticky.c fpsetsticky.c +.if ${MACHINE:Mearm*} != "" +SRCS.softfloat+=__aeabi_dcmpeq.c __aeabi_fcmpeq.c +SRCS.softfloat+=__aeabi_dcmpge.c __aeabi_fcmpge.c +SRCS.softfloat+=__aeabi_dcmpgt.c __aeabi_fcmpgt.c +SRCS.softfloat+=__aeabi_dcmple.c __aeabi_fcmple.c +SRCS.softfloat+=__aeabi_dcmplt.c __aeabi_fcmplt.c +SRCS.softfloat+=__aeabi_dcmpun.c __aeabi_fcmpun.c +.else SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \ eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \ eqtf2.c netf2.c gttf2.c getf2.c lttf2.c letf2.c negtf2.c \ nexf2.c gtxf2.c gexf2.c negxf2.c unordsf2.c unorddf2.c +.endif SRCS+= ${SRCS.softfloat} Index: src/lib/libc/softfloat/softfloat-for-gcc.h diff -u src/lib/libc/softfloat/softfloat-for-gcc.h:1.9 src/lib/libc/softfloat/softfloat-for-gcc.h:1.10 --- src/lib/libc/softfloat/softfloat-for-gcc.h:1.9 Sun Aug 5 04:27:42 2012 +++ src/lib/libc/softfloat/softfloat-for-gcc.h Tue Apr 16 10:54:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat-for-gcc.h,v 1.9 2012/08/05 04:27:42 matt Exp $ */ +/* $NetBSD: softfloat-for-gcc.h,v 1.10 2013/04/16 10:54:53 matt Exp $ */ /* * Move private identifiers with external linkage into implementation @@ -208,19 +208,4 @@ #define __extendsfdf2 __aeabi_f2d #define __truncdfsf2 __aeabi_d2f -#define __eqsf2__aeabi_fcmpeq -#define __eqdf2__aeabi_dcmpeq - -#define __ltsf2__aeabi_fcmplt -#define __ltdf2__aeabi_dcmplt - -#define __lesf2__aeabi_fcmple -#define __ledf2__aeabi_dcmple - -#define __gtsf2__aeabi_fcmpgt -#define __gtdf2__aeabi_dcmpgt - -#define __gesf2__aeabi_fcmpge -#define __gedf2__aeabi_dcmpge - #endif /* __ARM_EABI__ */
CVS commit: src/lib/libc/softfloat
Module Name:src Committed By: matt Date: Tue Apr 16 12:26:29 UTC 2013 Modified Files: src/lib/libc/softfloat: Makefile.inc Log Message: Use MACHINE_ARCH, not MACHINE To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/softfloat/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/Makefile.inc diff -u src/lib/libc/softfloat/Makefile.inc:1.13 src/lib/libc/softfloat/Makefile.inc:1.14 --- src/lib/libc/softfloat/Makefile.inc:1.13 Tue Apr 16 10:54:53 2013 +++ src/lib/libc/softfloat/Makefile.inc Tue Apr 16 12:26:28 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.13 2013/04/16 10:54:53 matt Exp $ +# $NetBSD: Makefile.inc,v 1.14 2013/04/16 12:26:28 matt Exp $ SOFTFLOAT_BITS?=64 .PATH: ${ARCHDIR}/softfloat \ @@ -12,7 +12,7 @@ SRCS.softfloat= softfloat.c SRCS.softfloat+=fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \ fpgetsticky.c fpsetsticky.c -.if ${MACHINE:Mearm*} != "" +.if ${MACHINE_ARCH:Mearm*} != "" SRCS.softfloat+=__aeabi_dcmpeq.c __aeabi_fcmpeq.c SRCS.softfloat+=__aeabi_dcmpge.c __aeabi_fcmpge.c SRCS.softfloat+=__aeabi_dcmpgt.c __aeabi_fcmpgt.c
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: martin Date: Tue Mar 29 18:42:29 UTC 2016 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Avoid warnings (signed/unsigned comparision and unused variable) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.13 src/lib/libc/softfloat/bits64/softfloat.c:1.14 --- src/lib/libc/softfloat/bits64/softfloat.c:1.13 Fri Nov 22 17:04:24 2013 +++ src/lib/libc/softfloat/bits64/softfloat.c Tue Mar 29 18:42:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $ */ +/* $NetBSD: softfloat.c,v 1.14 2016/03/29 18:42:29 martin Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $"); +__RCSID("$NetBSD: softfloat.c,v 1.14 2016/03/29 18:42:29 martin Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -661,7 +661,7 @@ static floatx80 { int8 roundingMode; flag roundNearestEven, increment, isTiny; -int64 roundIncrement, roundMask, roundBits; +uint64 roundIncrement, roundMask, roundBits; roundingMode = float_rounding_mode; roundNearestEven = ( roundingMode == float_round_nearest_even ); @@ -3938,7 +3938,7 @@ according to the IEC/IEEE Standard for B */ floatx80 floatx80_rem( floatx80 a, floatx80 b ) { -flag aSign, bSign, zSign; +flag aSign, zSign; int32 aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig; bits64 q, term0, term1, alternateASig0, alternateASig1; @@ -3949,7 +3949,7 @@ floatx80 floatx80_rem( floatx80 a, float aSign = extractFloatx80Sign( a ); bSig = extractFloatx80Frac( b ); bExp = extractFloatx80Exp( b ); -bSign = extractFloatx80Sign( b ); + if ( aExp == 0x7FFF ) { if ((bits64) ( aSig0<<1 ) || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) {
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: martin Date: Tue Mar 20 21:34:51 UTC 2012 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Remove initialized but unused variable To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.8 src/lib/libc/softfloat/bits64/softfloat.c:1.9 --- src/lib/libc/softfloat/bits64/softfloat.c:1.8 Sun Jul 10 04:52:23 2011 +++ src/lib/libc/softfloat/bits64/softfloat.c Tue Mar 20 21:34:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.8 2011/07/10 04:52:23 matt Exp $ */ +/* $NetBSD: softfloat.c,v 1.9 2012/03/20 21:34:51 martin Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: softfloat.c,v 1.8 2011/07/10 04:52:23 matt Exp $"); +__RCSID("$NetBSD: softfloat.c,v 1.9 2012/03/20 21:34:51 martin Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -5118,7 +5118,7 @@ according to the IEC/IEEE Standard for B */ float128 float128_rem( float128 a, float128 b ) { -flag aSign, bSign, zSign; +flag aSign, zSign; int32 aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2; bits64 allZero, alternateASig0, alternateASig1, sigMean1; @@ -5132,7 +5132,6 @@ float128 float128_rem( float128 a, float bSig1 = extractFloat128Frac1( b ); bSig0 = extractFloat128Frac0( b ); bExp = extractFloat128Exp( b ); -bSign = extractFloat128Sign( b ); if ( aExp == 0x7FFF ) { if (( aSig0 | aSig1 ) || ( ( bExp == 0x7FFF ) && ( bSig0 | bSig1 ) ) ) {
CVS commit: src/lib/libc/softfloat/bits32
Module Name:src Committed By: christos Date: Wed Mar 21 14:17:54 UTC 2012 Modified Files: src/lib/libc/softfloat/bits32: softfloat.c Log Message: add casts To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/softfloat/bits32/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits32/softfloat.c diff -u src/lib/libc/softfloat/bits32/softfloat.c:1.1 src/lib/libc/softfloat/bits32/softfloat.c:1.2 --- src/lib/libc/softfloat/bits32/softfloat.c:1.1 Tue May 21 19:51:07 2002 +++ src/lib/libc/softfloat/bits32/softfloat.c Wed Mar 21 10:17:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp $ */ +/* $NetBSD: softfloat.c,v 1.2 2012/03/21 14:17:54 christos Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -53,7 +53,7 @@ this code that are retained. #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp $"); +__RCSID("$NetBSD: softfloat.c,v 1.2 2012/03/21 14:17:54 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -237,7 +237,7 @@ static float32 roundAndPackFloat32( flag isTiny = ( float_detect_tininess == float_tininess_before_rounding ) || ( zExp < -1 ) -|| ( zSig + roundIncrement < 0x8000 ); +|| ( zSig + roundIncrement < (uint32)0x8000 ); shift32RightJamming( zSig, - zExp, &zSig ); zExp = 0; roundBits = zSig & 0x7F; @@ -281,7 +281,7 @@ floating-point value `a'. INLINE bits32 extractFloat64Frac1( float64 a ) { -return FLOAT64_DEMANGLE(a) & LIT64( 0x ); +return (bits32)(FLOAT64_DEMANGLE(a) & LIT64(0x)); } @@ -294,7 +294,7 @@ floating-point value `a'. INLINE bits32 extractFloat64Frac0( float64 a ) { -return ( FLOAT64_DEMANGLE(a)>>32 ) & 0x000F; +return (bits32)((FLOAT64_DEMANGLE(a) >> 32) & 0x000F); } @@ -306,7 +306,7 @@ Returns the exponent bits of the double- INLINE int16 extractFloat64Exp( float64 a ) { -return ( FLOAT64_DEMANGLE(a)>>52 ) & 0x7FF; +return (int16)((FLOAT64_DEMANGLE(a) >> 52) & 0x7FF); } @@ -318,7 +318,7 @@ Returns the sign bit of the double-preci INLINE flag extractFloat64Sign( float64 a ) { -return FLOAT64_DEMANGLE(a)>>63; +return (flag)(FLOAT64_DEMANGLE(a) >> 63); } @@ -535,7 +535,7 @@ float32 int32_to_float32( int32 a ) if ( a == 0 ) return 0; if ( a == (sbits32) 0x8000 ) return packFloat32( 1, 0x9E, 0 ); zSign = ( a < 0 ); -return normalizeRoundAndPackFloat32( zSign, 0x9C, zSign ? - a : a ); +return normalizeRoundAndPackFloat32(zSign, 0x9C, (uint32)(zSign ? - a : a)); }
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: matt Date: Sat Mar 24 00:06:21 UTC 2012 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Fix a bug introduced by lint cleanup. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.10 src/lib/libc/softfloat/bits64/softfloat.c:1.11 --- src/lib/libc/softfloat/bits64/softfloat.c:1.10 Wed Mar 21 02:32:26 2012 +++ src/lib/libc/softfloat/bits64/softfloat.c Sat Mar 24 00:06:20 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.10 2012/03/21 02:32:26 christos Exp $ */ +/* $NetBSD: softfloat.c,v 1.11 2012/03/24 00:06:20 matt Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: softfloat.c,v 1.10 2012/03/21 02:32:26 christos Exp $"); +__RCSID("$NetBSD: softfloat.c,v 1.11 2012/03/24 00:06:20 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -2000,7 +2000,7 @@ float32 float32_div( float32 a, float32 aSig >>= 1; ++zExp; } -zSig = (bits32)(((bits64) aSig) << 32) / bSig; +zSig = (bits32)bits64) aSig) << 32) / bSig); if ( ( zSig & 0x3F ) == 0 ) { zSig |= ( (bits64) bSig * zSig != ( (bits64) aSig )<<32 ); }
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: martin Date: Fri Nov 22 17:04:24 UTC 2013 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Fix a cast from the lint cleanup that made small exponents (i.e. values < 1) sign extend wrong and overflow, causing an underflow in all 128 bit sqrt calculations. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.12 src/lib/libc/softfloat/bits64/softfloat.c:1.13 --- src/lib/libc/softfloat/bits64/softfloat.c:1.12 Thu Jan 10 08:16:11 2013 +++ src/lib/libc/softfloat/bits64/softfloat.c Fri Nov 22 17:04:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.12 2013/01/10 08:16:11 matt Exp $ */ +/* $NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: softfloat.c,v 1.12 2013/01/10 08:16:11 matt Exp $"); +__RCSID("$NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -5261,7 +5261,7 @@ float128 float128_sqrt( float128 a ) if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( 0, 0, 0, 0 ); normalizeFloat128Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); } -zExp = ( (unsigned int)(aExp - 0x3FFF) >> 1) + 0x3FFE; +zExp = (int32) ( (aExp - 0x3FFF) >> 1) + 0x3FFE; aSig0 |= LIT64( 0x0001 ); zSig0 = estimateSqrt32((int16)aExp, (bits32)(aSig0>>17)); shortShift128Left( aSig0, aSig1, 13 - ( aExp & 1 ), &aSig0, &aSig1 );
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: matt Date: Sat Jul 9 02:28:31 UTC 2011 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Add SOFTFLOAT_NEED_FIXUNS condition around the float128 fixuns To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.6 src/lib/libc/softfloat/bits64/softfloat.c:1.7 --- src/lib/libc/softfloat/bits64/softfloat.c:1.6 Mon Jul 4 08:02:35 2011 +++ src/lib/libc/softfloat/bits64/softfloat.c Sat Jul 9 02:28:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.6 2011/07/04 08:02:35 matt Exp $ */ +/* $NetBSD: softfloat.c,v 1.7 2011/07/09 02:28:31 matt Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: softfloat.c,v 1.6 2011/07/04 08:02:35 matt Exp $"); +__RCSID("$NetBSD: softfloat.c,v 1.7 2011/07/09 02:28:31 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -4482,6 +4482,7 @@ } +#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) /* * just like above - but do not care for overflow of signed results */ @@ -4531,6 +4532,7 @@ return z; } +#endif /* defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) */ /* ---