summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2012-01-16 04:08:29 +0000
committerdas <das@FreeBSD.org>2012-01-16 04:08:29 +0000
commitd54add422b62c537333fcabdbe18e22974788b85 (patch)
tree43989f318ba3f507364b3031e1056639c15dac42 /sys/arm
parentdd671a50d4b918f6882bd4ed7ac5114e4207e1d1 (diff)
downloadFreeBSD-src-d54add422b62c537333fcabdbe18e22974788b85.zip
FreeBSD-src-d54add422b62c537333fcabdbe18e22974788b85.tar.gz
Implement FLT_ROUNDS for arm. Some (all?) arm FPUs lack support for
dynamic rounding modes, but FPUless chips that use softfloat can support it because everything is emulated anyway. (We presently have incomplete support for hardware FPUs.) Submitted by: Ian Lepore
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/include/float.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arm/include/float.h b/sys/arm/include/float.h
index ac5ceb9..4696eae 100644
--- a/sys/arm/include/float.h
+++ b/sys/arm/include/float.h
@@ -44,7 +44,11 @@ extern int __flt_rounds(void);
__END_DECLS
#define FLT_RADIX 2 /* b */
-#define FLT_ROUNDS -1
+#ifndef _ARM_HARD_FLOAT
+#define FLT_ROUNDS __flt_rounds()
+#else
+#define FLT_ROUNDS (-1)
+#endif
#define FLT_EVAL_METHOD (-1) /* XXX */
#define DECIMAL_DIG 17 /* max precision in decimal digits */
OpenPOWER on IntegriCloud