Date: Wed, 23 Sep 2020 02:05:44 +0000 (UTC) From: Brandon Bergren <bdragon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366054 - in head/lib/libc: powerpc/softfloat powerpc64 Message-ID: <202009230205.08N25iaD091417@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009230205.08N25iaD091417>