[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.
This commit is contained in:
Brandon Bergren 2020-09-23 02:05:44 +00:00
parent 0d356a5349
commit b257310103
2 changed files with 9 additions and 0 deletions

View File

@ -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
/*
-------------------------------------------------------------------------------

View File

@ -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