From d9649812521e9c67cebb2f9a932e853d5333b2b1 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 24 Feb 2012 01:52:11 -0800 Subject: Remove ARMFPA support and Q_DOUBLE_FORMAT detection Remove the -armfpa option the config.tests/unix/doubleformat* detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT has been removed as well. Rationale: ARM FPA with GCC does not work with EABI. Qt currently does not support compiling without EABI, making ARM FPA an impossibility. It is unknown whether other compilers provide ARM FPA support with EABI. Support for ARM FPA can be re-added in the future should the need arise, but since ARM VFP is available for ARMv5 and up, we should encourage implementors to instead use soft-floats or VFP. Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5 Reviewed-by: Thiago Macieira Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qnumeric_p.h | 42 ----------------------------------------- 1 file changed, 42 deletions(-) (limited to 'src/corelib/global/qnumeric_p.h') diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h index 6b5ecf73e1..851c18203d 100644 --- a/src/corelib/global/qnumeric_p.h +++ b/src/corelib/global/qnumeric_p.h @@ -61,63 +61,43 @@ QT_BEGIN_NAMESPACE static const union { unsigned char c[8]; double d; } qt_be_inf_bytes = { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; static const union { unsigned char c[8]; double d; } qt_le_inf_bytes = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; -static const union { unsigned char c[8]; double d; } qt_armfpa_inf_bytes = { { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } }; static inline double qt_inf() { -#ifdef QT_ARMFPA - return qt_armfpa_inf_bytes.d; -#else return (QSysInfo::ByteOrder == QSysInfo::BigEndian ? qt_be_inf_bytes.d : qt_le_inf_bytes.d); -#endif } // Signaling NAN static const union { unsigned char c[8]; double d; } qt_be_snan_bytes = { { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 } }; static const union { unsigned char c[8]; double d; } qt_le_snan_bytes = { { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } }; -static const union { unsigned char c[8]; double d; } qt_armfpa_snan_bytes = { { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 } }; static inline double qt_snan() { -#ifdef QT_ARMFPA - return qt_armfpa_snan_bytes.d; -#else return (QSysInfo::ByteOrder == QSysInfo::BigEndian ? qt_be_snan_bytes.d : qt_le_snan_bytes.d); -#endif } // Quiet NAN static const union { unsigned char c[8]; double d; } qt_be_qnan_bytes = { { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 } }; static const union { unsigned char c[8]; double d; } qt_le_qnan_bytes = { { 0, 0, 0, 0, 0, 0, 0xf8, 0xff } }; -static const union { unsigned char c[8]; double d; } qt_armfpa_qnan_bytes = { { 0, 0, 0xf8, 0xff, 0, 0, 0, 0 } }; static inline double qt_qnan() { -#ifdef QT_ARMFPA - return qt_armfpa_qnan_bytes.d; -#else return (QSysInfo::ByteOrder == QSysInfo::BigEndian ? qt_be_qnan_bytes.d : qt_le_qnan_bytes.d); -#endif } #else // Q_CC_MIPS static const unsigned char qt_be_inf_bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; static const unsigned char qt_le_inf_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; -static const unsigned char qt_armfpa_inf_bytes[] = { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }; static inline double qt_inf() { const unsigned char *bytes; -#ifdef QT_ARMFPA - bytes = qt_armfpa_inf_bytes; -#else bytes = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? qt_be_inf_bytes : qt_le_inf_bytes); -#endif union { unsigned char c[8]; double d; } returnValue; qMemCopy(returnValue.c, bytes, sizeof(returnValue.c)); @@ -127,17 +107,12 @@ static inline double qt_inf() // Signaling NAN static const unsigned char qt_be_snan_bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; static const unsigned char qt_le_snan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; -static const unsigned char qt_armfpa_snan_bytes[] = { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 }; static inline double qt_snan() { const unsigned char *bytes; -#ifdef QT_ARMFPA - bytes = qt_armfpa_snan_bytes; -#else bytes = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? qt_be_snan_bytes : qt_le_snan_bytes); -#endif union { unsigned char c[8]; double d; } returnValue; qMemCopy(returnValue.c, bytes, sizeof(returnValue.c)); @@ -147,17 +122,12 @@ static inline double qt_snan() // Quiet NAN static const unsigned char qt_be_qnan_bytes[] = { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 }; static const unsigned char qt_le_qnan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0xff }; -static const unsigned char qt_armfpa_qnan_bytes[] = { 0, 0, 0xf8, 0xff, 0, 0, 0, 0 }; static inline double qt_qnan() { const unsigned char *bytes; -#ifdef QT_ARMFPA - bytes = qt_armfpa_qnan_bytes; -#else bytes = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? qt_be_qnan_bytes : qt_le_qnan_bytes); -#endif union { unsigned char c[8]; double d; } returnValue; qMemCopy(returnValue.c, bytes, sizeof(returnValue.c)); @@ -169,43 +139,31 @@ static inline double qt_qnan() static inline bool qt_is_inf(double d) { uchar *ch = (uchar *)&d; -#ifdef QT_ARMFPA - return (ch[3] & 0x7f) == 0x7f && ch[2] == 0xf0; -#else if (QSysInfo::ByteOrder == QSysInfo::BigEndian) { return (ch[0] & 0x7f) == 0x7f && ch[1] == 0xf0; } else { return (ch[7] & 0x7f) == 0x7f && ch[6] == 0xf0; } -#endif } static inline bool qt_is_nan(double d) { uchar *ch = (uchar *)&d; -#ifdef QT_ARMFPA - return (ch[3] & 0x7f) == 0x7f && ch[2] > 0xf0; -#else if (QSysInfo::ByteOrder == QSysInfo::BigEndian) { return (ch[0] & 0x7f) == 0x7f && ch[1] > 0xf0; } else { return (ch[7] & 0x7f) == 0x7f && ch[6] > 0xf0; } -#endif } static inline bool qt_is_finite(double d) { uchar *ch = (uchar *)&d; -#ifdef QT_ARMFPA - return (ch[3] & 0x7f) != 0x7f || (ch[2] & 0xf0) != 0xf0; -#else if (QSysInfo::ByteOrder == QSysInfo::BigEndian) { return (ch[0] & 0x7f) != 0x7f || (ch[1] & 0xf0) != 0xf0; } else { return (ch[7] & 0x7f) != 0x7f || (ch[6] & 0xf0) != 0xf0; } -#endif } static inline bool qt_is_inf(float d) -- cgit v1.2.3