Significantly enhanced checks for CPU type and floating point format

supported.
This commit is contained in:
Joel Sherrill
2000-05-04 14:09:30 +00:00
parent 9c8d1edf6a
commit 4d42c4394f

View File

@@ -54,16 +54,27 @@ static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_float.c,v 1.7 1999/08/28 00
* This routine works on machines with IEEE754 FP and Vaxen. * This routine works on machines with IEEE754 FP and Vaxen.
*/ */
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ #if defined(__alpha__) || \
defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \ defined(__arm32__) || \
defined(__arm32__) || defined(__ppc__) || defined(__m68000__) defined(__hppa__) || \
defined(__i386__) || \
defined(__i960__) || \
defined(__m68k__) || defined(__mc68000__) || \
defined(__mips__) || \
defined(__ns32k__) || \
defined(__sparc__) || \
defined(__ppc__) || defined(__PPC__) || \
defined(__sh__)
#include <machine/endian.h> #include <machine/endian.h>
#if !defined(IEEEFP) #if !defined(IEEEFP)
#define IEEEFP #define IEEEFP
#endif #endif
#endif
#ifdef vax #elif defined(_TMS320C3x) || defined(_TMS320C4x)
#error "Texas Instruments C3x/C4x Not supported."
#elif defined(vax)
/* What IEEE single precision floating point looks like on a Vax */ /* What IEEE single precision floating point looks like on a Vax */
struct ieee_single { struct ieee_single {
@@ -92,7 +103,11 @@ static struct sgl_limits {
{{ 0x0, 0x0, 0x0, 0x0 }, /* Min Vax */ {{ 0x0, 0x0, 0x0, 0x0 }, /* Min Vax */
{ 0x0, 0x0, 0x0 }} /* Min IEEE */ { 0x0, 0x0, 0x0 }} /* Min IEEE */
}; };
#endif /* vax */ /* end of vax */
#else
#error "xdr_float.c: unknown CPU"
#endif
bool_t bool_t
xdr_float(xdrs, fp) xdr_float(xdrs, fp)