summaryrefslogtreecommitdiffstats
path: root/lib/libc/powerpc
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2004-07-19 23:56:07 +0000
committergallatin <gallatin@FreeBSD.org>2004-07-19 23:56:07 +0000
commit07524332dc804cf32528e76071068d2a4b470f80 (patch)
tree3b3b34c6ec21d9a1c093664f2c9f8f4c55392db9 /lib/libc/powerpc
parentcf7423d4fe9697707010fcf1b8f4f95a6b73d278 (diff)
downloadFreeBSD-src-07524332dc804cf32528e76071068d2a4b470f80.zip
FreeBSD-src-07524332dc804cf32528e76071068d2a4b470f80.tar.gz
Fix printing of long doubles to match the size that
gcc is using. This fixes devstat consumers (like vmstat, iostat, systat) so they don't print crazy zillion digit numbers for disk transfers and bandwidth. According to gcc, long doubles are 64-bits, rather than 128 bits like the SVR4 ABI spec wants them to be.. Note that MacOSX also treats long doubles as 64-bits, and not 128 bits, so we are in good company. Reviewed by: das Approved by: grehan
Diffstat (limited to 'lib/libc/powerpc')
-rw-r--r--lib/libc/powerpc/_fpmath.h14
-rw-r--r--lib/libc/powerpc/stdlib/gdtoa.mk5
2 files changed, 8 insertions, 11 deletions
diff --git a/lib/libc/powerpc/_fpmath.h b/lib/libc/powerpc/_fpmath.h
index 9672da3..d96bac2 100644
--- a/lib/libc/powerpc/_fpmath.h
+++ b/lib/libc/powerpc/_fpmath.h
@@ -30,21 +30,19 @@ union IEEEl2bits {
long double e;
struct {
unsigned int sign :1;
- unsigned int exp :15;
- unsigned long long manh :48;
- unsigned long long manl :64;
+ unsigned int exp :11;
+ unsigned int manh :20;
+ unsigned int manl :32;
} bits;
};
#define mask_nbit_l(u) ((void)0)
#define LDBL_IMPLICIT_NBIT
-#define LDBL_MANH_SIZE 48
-#define LDBL_MANL_SIZE 64
+#define LDBL_MANH_SIZE 20
+#define LDBL_MANL_SIZE 32
#define LDBL_TO_ARRAY32(u, a) do { \
(a)[0] = (uint32_t)(u).bits.manl; \
- (a)[1] = (uint32_t)((u).bits.manl >> 32); \
- (a)[2] = (uint32_t)(u).bits.manh; \
- (a)[3] = (uint32_t)((u).bits.manh >> 32); \
+ (a)[1] = (uint32_t)(u).bits.manh; \
} while(0)
diff --git a/lib/libc/powerpc/stdlib/gdtoa.mk b/lib/libc/powerpc/stdlib/gdtoa.mk
index f951a8d..726531d 100644
--- a/lib/libc/powerpc/stdlib/gdtoa.mk
+++ b/lib/libc/powerpc/stdlib/gdtoa.mk
@@ -1,5 +1,4 @@
# $FreeBSD$
-# Long double is quad precision
-GDTOASRCS+=strtopQ.c
-MDSRCS+=machdep_ldisQ.c
+# Long double is 64-bits
+MDSRCS+=machdep_ldisd.c
OpenPOWER on IntegriCloud