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.
This commit is contained in:
jmmv 2004-09-26 21:13:27 +00:00
parent 25b218cbd7
commit 8a1eb34d66
14 changed files with 578 additions and 15 deletions

View File

@ -1,4 +1,4 @@
LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.367 $>
LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.368 $>
[Note: This file does not mention every change made to the NetBSD source tree.
@ -124,3 +124,4 @@ Changes from NetBSD 2.0 to NetBSD 2.1:
options. [thorpej 20040913]
heimdal: import version 0.6.3. [lha 20040913]
file(1): update to 4.10. [pooka 20040916]
mac68k: Support to build with soft-float enabled. [jmmv 20040926]

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.9 2003/09/22 14:42:02 cl Exp $
# $NetBSD: Makefile.inc,v 1.10 2004/09/26 21:13:27 jmmv Exp $
KMINCLUDES= arch/m68k/DEFS.h arch/m68k/SYS.h
KMSRCS= bcmp.S bcopy.S bzero.S ffs.S index.S rindex.S \
@ -9,3 +9,8 @@ KMSRCS= bcmp.S bcopy.S bzero.S ffs.S index.S rindex.S \
bswap16.S bswap32.S bswap64.S
SRCS+= __sigaction14_sigtramp.c __sigtramp1.S __sigtramp2.S
.if ${MKSOFTFLOAT} != "no"
CPPFLAGS+= -DSOFTLOFLOAT_NEED_FIXUNS -DSOFTFLOAT -DSOFTFLOATM68K_FOR_GCC
. include <softfloat/Makefile.inc>
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.24 2004/03/04 23:42:38 kleink Exp $
# $NetBSD: Makefile.inc,v 1.25 2004/09/26 21:13:27 jmmv Exp $
SRCS+= alloca.S fabs.S
@ -30,7 +30,7 @@ SRCS+= _lwp.c
# 68000-based machines build with a libgcc that includes
# much of the (soft)float and integer support that would
# otherwise be compiled here.
.if ${MACHINE_ARCH} == "m68000"
.if (${MACHINE_ARCH} == "m68000" || ${MKSOFTFLOAT} == "yes")
SRCS+= modf_ieee754.c # generic ieee754 version
SRCS+= flt_rounds_softfloat.S
.else
@ -52,6 +52,8 @@ SRCS+= makecontext.c resumecontext.S swapcontext.S
.ifdef M68040
SRCS+= ldexp_ieee754.c # generic ieee754 version
.elifdef MKSOFTFLOAT
SRCS+= ldexp_ieee754.c # generic ieee754 version
.elifdef M68060
SRCS+= ldexp_ieee754.c # generic ieee754 version
.elif ${MACHINE_ARCH} == "m68000"

View File

@ -1,8 +1,12 @@
/* $NetBSD: flt_rounds_softfloat.S,v 1.1 2001/05/17 21:46:26 fredette Exp $ */
/* $NetBSD: flt_rounds_softfloat.S,v 1.2 2004/09/26 21:13:27 jmmv Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
* Broken by Bruce O'Neel Aug 4 2003
gcc no longer seems to export fpCCR so this fails.
for now just return 0.
*/
#include <machine/asm.h>
@ -18,10 +22,10 @@ _map:
.byte 3 /* round to negative infinity */
ENTRY(__flt_rounds)
lea _C_LABEL(_fpCCR),%a0 | check the rounding mode
movew %a0@(6),%d0 | rounding mode in d0
lea _map,%a0
moveb %a0@(%d0:l:1),%d0
/* lea _C_LABEL(_fpCCR),%a0 | check the rounding mode */
/* movew %a0@(6),%d0 | rounding mode in d0 */
/* lea _map,%a0 */
moveb #0,%d0
rts

View File

@ -0,0 +1,89 @@
/* $NetBSD: m68k-gcc.h,v 1.1 2004/09/26 21:13:27 jmmv Exp $ */
/*
-------------------------------------------------------------------------------
One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
-------------------------------------------------------------------------------
*/
#include <machine/endian.h>
#if _BYTE_ORDER == _BIG_ENDIAN
#define BIGENDIAN
#endif
#if _BYTE_ORDER == _LITTLE_ENDIAN
#define LITTLEENDIAN
#endif
/*
-------------------------------------------------------------------------------
The macro `BITS64' can be defined to indicate that 64-bit integer types are
supported by the compiler.
-------------------------------------------------------------------------------
*/
#define BITS64
/*
-------------------------------------------------------------------------------
Each of the following `typedef's defines the most convenient type that holds
integers of at least as many bits as specified. For example, `uint8' should
be the most convenient type that can hold unsigned integers of as many as
8 bits. The `flag' type must be able to hold either a 0 or 1. For most
implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
to the same as `int'.
-------------------------------------------------------------------------------
*/
typedef int flag;
typedef int uint8;
typedef int int8;
typedef int uint16;
typedef int int16;
typedef unsigned int uint32;
typedef signed int int32;
#ifdef BITS64
typedef unsigned long long int uint64;
typedef signed long long int int64;
#endif
/*
-------------------------------------------------------------------------------
Each of the following `typedef's defines a type that holds integers
of _exactly_ the number of bits specified. For instance, for most
implementation of C, `bits16' and `sbits16' should be `typedef'ed to
`unsigned short int' and `signed short int' (or `short int'), respectively.
-------------------------------------------------------------------------------
*/
typedef unsigned char bits8;
typedef signed char sbits8;
typedef unsigned short int bits16;
typedef signed short int sbits16;
typedef unsigned int bits32;
typedef signed int sbits32;
#ifdef BITS64
typedef unsigned long long int bits64;
typedef signed long long int sbits64;
#endif
#ifdef BITS64
/*
-------------------------------------------------------------------------------
The `LIT64' macro takes as its argument a textual integer literal and
if necessary ``marks'' the literal as having a 64-bit integer type.
For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
appended with the letters `LL' standing for `long long', which is `gcc's
name for the 64-bit integer type. Some compilers may allow `LIT64' to be
defined as the identity macro: `#define LIT64( a ) a'.
-------------------------------------------------------------------------------
*/
#define LIT64( a ) a##LL
#endif
/*
-------------------------------------------------------------------------------
The macro `INLINE' can be used before functions that should be inlined. If
a compiler does not support explicit inlining, this macro should be defined
to be `static'.
-------------------------------------------------------------------------------
*/
#define INLINE static __inline
#define FLOAT64_DEMANGLE(a) (a)
#define FLOAT64_MANGLE(a) (a)

View File

@ -0,0 +1,48 @@
/* $NetBSD: milieu.h,v 1.1 2004/09/26 21:13:27 jmmv Exp $ */
/*
===============================================================================
This C header file is part of the SoftFloat IEC/IEEE Floating-point
Arithmetic Package, Release 2a.
Written by John R. Hauser. This work was made possible in part by the
International Computer Science Institute, located at Suite 600, 1947 Center
Street, Berkeley, California 94704. Funding was partially provided by the
National Science Foundation under grant MIP-9311980. The original version
of this code was written as part of a project to build a fixed-point vector
processor in collaboration with the University of California at Berkeley,
overseen by Profs. Nelson Morgan and John Wawrzynek. More information
is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
arithmetic/SoftFloat.html'.
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
Derivative works are acceptable, even for commercial purposes, so long as
(1) they include prominent notice that the work is derivative, and (2) they
include prominent notice akin to these four paragraphs for those parts of
this code that are retained.
===============================================================================
*/
/*
-------------------------------------------------------------------------------
Include common integer types and flags.
-------------------------------------------------------------------------------
*/
#include "m68k-gcc.h"
/*
-------------------------------------------------------------------------------
Symbolic Boolean literals.
-------------------------------------------------------------------------------
*/
enum {
FALSE = 0,
TRUE = 1
};

View File

@ -0,0 +1,300 @@
/* $NetBSD: softfloat.h,v 1.1 2004/09/26 21:13:27 jmmv Exp $ */
/* This is a derivative work. */
/*
===============================================================================
This C header file is part of the SoftFloat IEC/IEEE Floating-point
Arithmetic Package, Release 2a.
Written by John R. Hauser. This work was made possible in part by the
International Computer Science Institute, located at Suite 600, 1947 Center
Street, Berkeley, California 94704. Funding was partially provided by the
National Science Foundation under grant MIP-9311980. The original version
of this code was written as part of a project to build a fixed-point vector
processor in collaboration with the University of California at Berkeley,
overseen by Profs. Nelson Morgan and John Wawrzynek. More information
is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
arithmetic/SoftFloat.html'.
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
Derivative works are acceptable, even for commercial purposes, so long as
(1) they include prominent notice that the work is derivative, and (2) they
include prominent notice akin to these four paragraphs for those parts of
this code that are retained.
===============================================================================
*/
/*
-------------------------------------------------------------------------------
The macro `FLOATX80' must be defined to enable the extended double-precision
floating-point format `floatx80'. If this macro is not defined, the
`floatx80' type will not be defined, and none of the functions that either
input or output the `floatx80' type will be defined. The same applies to
the `FLOAT128' macro and the quadruple-precision format `float128'.
-------------------------------------------------------------------------------
*/
#define FLOATX80
/* #define FLOAT128 */
#include <machine/ieeefp.h>
/*
-------------------------------------------------------------------------------
Software IEC/IEEE floating-point types.
-------------------------------------------------------------------------------
*/
typedef unsigned int float32;
typedef unsigned long long float64;
#ifdef FLOATX80
typedef struct {
unsigned short high;
unsigned long long low;
} floatx80;
#endif
#ifdef FLOAT128
typedef struct {
unsigned long long high, low;
} float128;
#endif
/*
-------------------------------------------------------------------------------
Software IEC/IEEE floating-point underflow tininess-detection mode.
-------------------------------------------------------------------------------
*/
extern int8 float_detect_tininess;
enum {
float_tininess_after_rounding = 0,
float_tininess_before_rounding = 1
};
/*
-------------------------------------------------------------------------------
Software IEC/IEEE floating-point rounding mode.
-------------------------------------------------------------------------------
*/
extern fp_rnd float_rounding_mode;
enum {
float_round_nearest_even = FP_RN,
float_round_to_zero = FP_RZ,
float_round_down = FP_RM,
float_round_up = FP_RP
};
/*
-------------------------------------------------------------------------------
Software IEC/IEEE floating-point exception flags.
-------------------------------------------------------------------------------
*/
extern fp_except float_exception_flags;
extern fp_except float_exception_mask;
enum {
float_flag_inexact = FP_X_IMP,
float_flag_underflow = FP_X_UFL,
float_flag_overflow = FP_X_OFL,
float_flag_divbyzero = FP_X_DZ,
float_flag_invalid = FP_X_INV
};
/*
-------------------------------------------------------------------------------
Routine to raise any or all of the software IEC/IEEE floating-point
exception flags.
-------------------------------------------------------------------------------
*/
void float_raise( fp_except );
/*
-------------------------------------------------------------------------------
Software IEC/IEEE integer-to-floating-point conversion routines.
-------------------------------------------------------------------------------
*/
float32 int32_to_float32( int );
float64 int32_to_float64( int );
#ifdef FLOATX80
floatx80 int32_to_floatx80( int );
#endif
#ifdef FLOAT128
float128 int32_to_float128( int );
#endif
float32 int64_to_float32( long long );
float64 int64_to_float64( long long );
#ifdef FLOATX80
floatx80 int64_to_floatx80( long long );
#endif
#ifdef FLOAT128
float128 int64_to_float128( long long );
#endif
/*
-------------------------------------------------------------------------------
Software IEC/IEEE single-precision conversion routines.
-------------------------------------------------------------------------------
*/
int float32_to_int32( float32 );
int float32_to_int32_round_to_zero( float32 );
unsigned int float32_to_uint32_round_to_zero( float32 );
long long float32_to_int64( float32 );
long long float32_to_int64_round_to_zero( float32 );
float64 float32_to_float64( float32 );
#ifdef FLOATX80
floatx80 float32_to_floatx80( float32 );
#endif
#ifdef FLOAT128
float128 float32_to_float128( float32 );
#endif
/*
-------------------------------------------------------------------------------
Software IEC/IEEE single-precision operations.
-------------------------------------------------------------------------------
*/
float32 float32_round_to_int( float32 );
float32 float32_add( float32, float32 );
float32 float32_sub( float32, float32 );
float32 float32_mul( float32, float32 );
float32 float32_div( float32, float32 );
float32 float32_rem( float32, float32 );
float32 float32_sqrt( float32 );
flag float32_eq( float32, float32 );
flag float32_le( float32, float32 );
flag float32_lt( float32, float32 );
flag float32_eq_signaling( float32, float32 );
flag float32_le_quiet( float32, float32 );
flag float32_lt_quiet( float32, float32 );
#ifndef SOFTFLOAT_FOR_GCC
flag float32_is_signaling_nan( float32 );
#endif
/*
-------------------------------------------------------------------------------
Software IEC/IEEE double-precision conversion routines.
-------------------------------------------------------------------------------
*/
int float64_to_int32( float64 );
int float64_to_int32_round_to_zero( float64 );
unsigned int float64_to_uint32_round_to_zero( float64 );
long long float64_to_int64( float64 );
long long float64_to_int64_round_to_zero( float64 );
float32 float64_to_float32( float64 );
#ifdef FLOATX80
floatx80 float64_to_floatx80( float64 );
#endif
#ifdef FLOAT128
float128 float64_to_float128( float64 );
#endif
/*
-------------------------------------------------------------------------------
Software IEC/IEEE double-precision operations.
-------------------------------------------------------------------------------
*/
float64 float64_round_to_int( float64 );
float64 float64_add( float64, float64 );
float64 float64_sub( float64, float64 );
float64 float64_mul( float64, float64 );
float64 float64_div( float64, float64 );
float64 float64_rem( float64, float64 );
float64 float64_sqrt( float64 );
flag float64_eq( float64, float64 );
flag float64_le( float64, float64 );
flag float64_lt( float64, float64 );
flag float64_eq_signaling( float64, float64 );
flag float64_le_quiet( float64, float64 );
flag float64_lt_quiet( float64, float64 );
flag float64_is_signaling_nan( float64 );
#ifdef FLOATX80
/*
-------------------------------------------------------------------------------
Software IEC/IEEE extended double-precision conversion routines.
-------------------------------------------------------------------------------
*/
int floatx80_to_int32( floatx80 );
int floatx80_to_int32_round_to_zero( floatx80 );
long long floatx80_to_int64( floatx80 );
long long floatx80_to_int64_round_to_zero( floatx80 );
float32 floatx80_to_float32( floatx80 );
float64 floatx80_to_float64( floatx80 );
#ifdef FLOAT128
float128 floatx80_to_float128( floatx80 );
#endif
/*
-------------------------------------------------------------------------------
Software IEC/IEEE extended double-precision rounding precision. Valid
values are 32, 64, and 80.
-------------------------------------------------------------------------------
*/
extern int floatx80_rounding_precision;
/*
-------------------------------------------------------------------------------
Software IEC/IEEE extended double-precision operations.
-------------------------------------------------------------------------------
*/
floatx80 floatx80_round_to_int( floatx80 );
floatx80 floatx80_add( floatx80, floatx80 );
floatx80 floatx80_sub( floatx80, floatx80 );
floatx80 floatx80_mul( floatx80, floatx80 );
floatx80 floatx80_div( floatx80, floatx80 );
floatx80 floatx80_rem( floatx80, floatx80 );
floatx80 floatx80_sqrt( floatx80 );
flag floatx80_eq( floatx80, floatx80 );
flag floatx80_le( floatx80, floatx80 );
flag floatx80_lt( floatx80, floatx80 );
flag floatx80_eq_signaling( floatx80, floatx80 );
flag floatx80_le_quiet( floatx80, floatx80 );
flag floatx80_lt_quiet( floatx80, floatx80 );
flag floatx80_is_signaling_nan( floatx80 );
flag floatx80_is_nan( floatx80 );
#endif
#ifdef FLOAT128
/*
-------------------------------------------------------------------------------
Software IEC/IEEE quadruple-precision conversion routines.
-------------------------------------------------------------------------------
*/
int float128_to_int32( float128 );
int float128_to_int32_round_to_zero( float128 );
long long float128_to_int64( float128 );
long long float128_to_int64_round_to_zero( float128 );
float32 float128_to_float32( float128 );
float64 float128_to_float64( float128 );
#ifdef FLOATX80
floatx80 float128_to_floatx80( float128 );
#endif
/*
-------------------------------------------------------------------------------
Software IEC/IEEE quadruple-precision operations.
-------------------------------------------------------------------------------
*/
float128 float128_round_to_int( float128 );
float128 float128_add( float128, float128 );
float128 float128_sub( float128, float128 );
float128 float128_mul( float128, float128 );
float128 float128_div( float128, float128 );
float128 float128_rem( float128, float128 );
float128 float128_sqrt( float128 );
flag float128_eq( float128, float128 );
flag float128_le( float128, float128 );
flag float128_lt( float128, float128 );
flag float128_eq_signaling( float128, float128 );
flag float128_le_quiet( float128, float128 );
flag float128_lt_quiet( float128, float128 );
flag float128_is_signaling_nan( float128 );
#endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.3 2003/05/06 08:58:20 rearnsha Exp $
# $NetBSD: Makefile.inc,v 1.4 2004/09/26 21:13:27 jmmv Exp $
SOFTFLOAT_BITS?=64
.PATH: ${ARCHDIR}/softfloat \
@ -14,4 +14,4 @@ SRCS+= fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \
SRCS+= 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 \
unordsf2.c unorddf2.c
nexf2.c gtxf2.c gexf2.c negxf2.c unordsf2.c unorddf2.c

View File

@ -0,0 +1,24 @@
/* $NetBSD: gexf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $ */
/*
* Written by Ben Harris, 2000. This file is in the Public Domain.
*/
#include "softfloat-for-gcc.h"
#include "milieu.h"
#include "softfloat.h"
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: gexf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $");
#endif /* LIBC_SCCS and not lint */
flag __gexf2(floatx80, floatx80);
flag
__gexf2(floatx80 a, floatx80 b)
{
/* libgcc1.c says (a >= b) - 1 */
return floatx80_le(b, a) - 1;
}

View File

@ -0,0 +1,24 @@
/* $NetBSD: gtxf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $ */
/*
* Written by Ben Harris, 2000. This file is in the Public Domain.
*/
#include "softfloat-for-gcc.h"
#include "milieu.h"
#include "softfloat.h"
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: gtxf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $");
#endif /* LIBC_SCCS and not lint */
flag __gtxf2(floatx80, floatx80);
flag
__gtxf2(floatx80 a, floatx80 b)
{
/* libgcc1.c says a > b */
return floatx80_lt(b, a);
}

View File

@ -0,0 +1,24 @@
/* $NetBSD: negxf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $ */
/*
* Written by Ben Harris, 2000. This file is in the Public Domain.
*/
#include "softfloat-for-gcc.h"
#include "milieu.h"
#include "softfloat.h"
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: negxf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $");
#endif /* LIBC_SCCS and not lint */
floatx80 __negxf2(floatx80);
floatx80
__negxf2(floatx80 a)
{
/* libgcc1.c says -a */
return __mulxf3(a,__floatsixf(-1));
}

View File

@ -0,0 +1,24 @@
/* $NetBSD: nexf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $ */
/*
* Written by Ben Harris, 2000. This file is in the Public Domain.
*/
#include "softfloat-for-gcc.h"
#include "milieu.h"
#include "softfloat.h"
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: nexf2.c,v 1.1 2004/09/26 21:13:27 jmmv Exp $");
#endif /* LIBC_SCCS and not lint */
flag __nexf2(floatx80, floatx80);
flag
__nexf2(floatx80 a, floatx80 b)
{
/* libgcc1.c says a != b */
return !floatx80_eq(a, b);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: softfloat-for-gcc.h,v 1.6 2003/07/26 19:24:51 salo Exp $ */
/* $NetBSD: softfloat-for-gcc.h,v 1.7 2004/09/26 21:13:27 jmmv Exp $ */
/*
* Move private identifiers with external linkage into implementation
@ -22,21 +22,37 @@
#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

View File

@ -1,4 +1,4 @@
/* $NetBSD: softfloat-specialize,v 1.3 2002/05/12 13:12:45 bjh21 Exp $ */
/* $NetBSD: softfloat-specialize,v 1.4 2004/09/26 21:13:27 jmmv Exp $ */
/* This is a derivative work. */
@ -103,7 +103,8 @@ Returns 1 if the single-precision floating-point value `a' is a signaling
NaN; otherwise returns 0.
-------------------------------------------------------------------------------
*/
#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC)
#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC) && \
!defined(SOFTFLOAT_M68K_FOR_GCC)
static
#endif
flag float32_is_signaling_nan( float32 a )
@ -202,7 +203,8 @@ Returns 1 if the double-precision floating-point value `a' is a signaling
NaN; otherwise returns 0.
-------------------------------------------------------------------------------
*/
#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC)
#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC) && \
!defined(SOFTFLOATM68K_FOR_GCC)
static
#endif
flag float64_is_signaling_nan( float64 a )