summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include/float.h
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2008-02-24 19:22:53 +0000
committerraj <raj@FreeBSD.org>2008-02-24 19:22:53 +0000
commit69575dab5278af6417ba186bc878ac07a058e66c (patch)
treef597ddba01b642786124c14eddc6e4bf3de65a48 /sys/powerpc/include/float.h
parenta1bea77d138ffb6cfd42610b2b91e82d8710297d (diff)
downloadFreeBSD-src-69575dab5278af6417ba186bc878ac07a058e66c.zip
FreeBSD-src-69575dab5278af6417ba186bc878ac07a058e66c.tar.gz
Let PowerPC world optionally build with -msoft-float. For FPU-less PowerPC
variations (e500 currently), this provides a gcc-level FPU emulation and is an alternative approach to the recently introduced kernel-level emulation (FPU_EMU). Approved by: cognet (mentor) MFp4: e500
Diffstat (limited to 'sys/powerpc/include/float.h')
-rw-r--r--sys/powerpc/include/float.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/powerpc/include/float.h b/sys/powerpc/include/float.h
index 5ac715a..d20736d 100644
--- a/sys/powerpc/include/float.h
+++ b/sys/powerpc/include/float.h
@@ -36,12 +36,16 @@
#include <sys/cdefs.h>
+#ifndef _SOFT_FLOAT
__BEGIN_DECLS
extern int __flt_rounds(void);
__END_DECLS
+#define FLT_ROUNDS __flt_rounds()
+#else
+#define FLT_ROUNDS -1
+#endif
#define FLT_RADIX 2 /* b */
-#define FLT_ROUNDS __flt_rounds()
#if __ISO_C_VISIBLE >= 1999
#define FLT_EVAL_METHOD 1 /* operands promoted to double */
#define DECIMAL_DIG 35 /* max precision in decimal digits */
OpenPOWER on IntegriCloud