svn commit: r366054 - in head/lib/libc: powerpc/softfloat powerpc64
Brandon Bergren
bdragon at FreeBSD.org
Wed Sep 23 02:05:45 UTC 2020
Author: bdragon
Date: Wed Sep 23 02:05:44 2020
New Revision: 366054
URL: https://svnweb.freebsd.org/changeset/base/366054
Log:
[PowerPC64LE] Fix gdtoa configurations on LE.
gdtoa wins the award for "most outdated endianness naming convention"
with its IEEE_8087 vs IEEE_MC68k defines. I had a good chuckle.
Update softfloat and arith.h to adjust to BE or LE automatically
based on the low level preprocessor defines.
Fixes printf/scanf on PowerPC64LE, although there is still a problem
lurking regarding Signalling NaNs...
Sponsored by: Tag1 Consulting, Inc.
Modified:
head/lib/libc/powerpc/softfloat/powerpc-gcc.h
head/lib/libc/powerpc64/arith.h
Modified: head/lib/libc/powerpc/softfloat/powerpc-gcc.h
==============================================================================
--- head/lib/libc/powerpc/softfloat/powerpc-gcc.h Wed Sep 23 01:56:26 2020 (r366053)
+++ head/lib/libc/powerpc/softfloat/powerpc-gcc.h Wed Sep 23 02:05:44 2020 (r366054)
@@ -6,7 +6,11 @@
One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
-------------------------------------------------------------------------------
*/
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define LITTLEENDIAN
+#else
#define BIGENDIAN
+#endif
/*
-------------------------------------------------------------------------------
Modified: head/lib/libc/powerpc64/arith.h
==============================================================================
--- head/lib/libc/powerpc64/arith.h Wed Sep 23 01:56:26 2020 (r366053)
+++ head/lib/libc/powerpc64/arith.h Wed Sep 23 02:05:44 2020 (r366054)
@@ -11,8 +11,13 @@
* architecture. See contrib/gdtoa/gdtoaimp.h for details.
*/
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define IEEE_8087
+#define Arith_Kind_ASL 1
+#else
#define IEEE_MC68k
#define Arith_Kind_ASL 2
+#endif
#define Long int
#define Intcast (int)(long)
#define Double_Align
More information about the svn-src-all
mailing list