[BACK]Return to softfloat-for-gcc.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / softfloat

File: [cvs.NetBSD.org] / src / lib / libc / softfloat / softfloat-for-gcc.h (download)

Revision 1.7, Sun Sep 26 21:13:27 2004 UTC (15 years, 2 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, mjf-devfs2-base, mjf-devfs2, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u1-k1-k5, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, christos-time_t-nbase, christos-time_t-base, christos-time_t, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: matt-nb5-mips64
Changes since 1.6: +17 -1 lines

Add support to build the mac68k port with soft-float enabled (i.e., setting
MKSOFTFLOAT=yes).  The main purpose of this feature is to let NetBSD work
in machines with the 68040LC chip (those that have the FPU bug).

All the work has been done by Bruce O'Neel <edoneel AT sdf.lonestar.org>,
with some very minor changes by me; the patches were being posted to the
port-mac68k mailing list.  It has been tested for a long time by several
users, including me.

I have just verified that regular releases, as well as soft-float ones,
continue to build.

There have been no objections to this patch since I asked for them in July
in the port-mac68k list.

/* $NetBSD: softfloat-for-gcc.h,v 1.7 2004/09/26 21:13:27 jmmv Exp $ */

 * Move private identifiers with external linkage into implementation
 * namespace.  -- Klaus Klein <kleink@NetBSD.org>, May 5, 1999
#define float_exception_flags	_softfloat_float_exception_flags
#define float_exception_mask	_softfloat_float_exception_mask
#define float_rounding_mode	_softfloat_float_rounding_mode
#define float_raise		_softfloat_float_raise
/* The following batch are called by GCC through wrappers */
#define float32_eq		_softfloat_float32_eq
#define float32_le		_softfloat_float32_le
#define float32_lt		_softfloat_float32_lt
#define float64_eq		_softfloat_float64_eq
#define float64_le		_softfloat_float64_le
#define float64_lt		_softfloat_float64_lt

 * Macros to define functions with the GCC expected names

#define float32_add			__addsf3
#define float64_add			__adddf3
#define floatx80_add			__addxf3
#define float32_sub			__subsf3
#define float64_sub			__subdf3
#define floatx80_sub			__subxf3
#define float32_mul			__mulsf3
#define float64_mul			__muldf3
#define floatx80_mul			__mulxf3
#define float32_div			__divsf3
#define float64_div			__divdf3
#define floatx80_div			__divxf3
#define int32_to_float32		__floatsisf
#define int32_to_float64		__floatsidf
#define int32_to_floatx80		__floatsixf
#define int64_to_float32		__floatdisf
#define int64_to_float64		__floatdidf
#define int64_to_floatx80		__floatdixf
#define float32_to_int32_round_to_zero	__fixsfsi
#define float64_to_int32_round_to_zero	__fixdfsi
#define floatx80_to_int32_round_to_zero __fixxfsi
#define float32_to_int64_round_to_zero	__fixsfdi
#define float64_to_int64_round_to_zero	__fixdfdi
#define floatx80_to_int64_round_to_zero __fixxfdi
#define float32_to_uint32_round_to_zero	__fixunssfsi
#define float64_to_uint32_round_to_zero	__fixunsdfsi
#define float32_to_float64		__extendsfdf2
#define float64_to_floatx80		__extenddfxf2
#define float32_to_floatx80		__extendsfxf2
#define float64_to_float32		__truncdfsf2
#define floatx80_to_float64		__truncxfdf2
#define floatx80_to_float32		__truncxfsf2

#define floatx80_lt			__ltxf2
#define floatx80_eq			__eqxf2
#define floatx80_le			__lexf2