diff options
-rw-r--r-- | src/corelib/global/qglobal.h | 11 | ||||
-rw-r--r-- | src/corelib/io/qiodevice.cpp | 20 | ||||
-rw-r--r-- | src/corelib/kernel/qfunctions_p.h | 10 | ||||
-rw-r--r-- | src/corelib/tools/qbytearraymatcher.h | 8 | ||||
-rw-r--r-- | src/corelib/tools/qhash.h | 18 | ||||
-rw-r--r-- | src/corelib/tools/qmap.h | 18 | ||||
-rw-r--r-- | src/corelib/tools/qstringmatcher.h | 8 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 31 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 29 | ||||
-rw-r--r-- | src/network/kernel/qnetworkinterface.cpp | 5 |
10 files changed, 5 insertions, 153 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index cb0f66842c..273dcb9acb 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -624,14 +624,7 @@ Q_CORE_EXPORT bool qSharedBuild() Q_DECL_NOTHROW; /* Avoid "unused parameter" warnings */ - -#if defined(Q_CC_RVCT) -template <typename T> -inline void qUnused(T &x) { (void)x; } -# define Q_UNUSED(x) qUnused(x); -#else -# define Q_UNUSED(x) (void)x; -#endif +#define Q_UNUSED(x) (void)x; /* Debugging and error handling @@ -865,7 +858,7 @@ QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantic # endif #endif -#if defined(Q_COMPILER_DECLTYPE) || (defined(Q_CC_GNU) && !defined(Q_CC_RVCT)) +#if defined(Q_COMPILER_DECLTYPE) || defined(Q_CC_GNU) /* make use of decltype or GCC's __typeof__ extension */ template <typename T> class QForeachContainer { diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index d7ce8731c5..b1f164ab1b 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -733,12 +733,6 @@ qint64 QIODevice::bytesToWrite() const return qint64(0); } -#ifdef Q_CC_RVCT -// arm mode makes the 64-bit integer operations much faster in RVCT 2.2 -#pragma push -#pragma arm -#endif - /*! Reads at most \a maxSize bytes from the device into \a data, and returns the number of bytes read. If an error occurs, such as when @@ -902,10 +896,6 @@ qint64 QIODevice::read(char *data, qint64 maxSize) return readSoFar; } -#ifdef Q_CC_RVCT -#pragma pop -#endif - /*! \overload @@ -1018,12 +1008,6 @@ QByteArray QIODevice::readAll() return result; } -#ifdef Q_CC_RVCT -// arm mode makes the 64-bit integer operations much faster in RVCT 2.2 -#pragma push -#pragma arm -#endif - /*! This function reads a line of ASCII characters from the device, up to a maximum of \a maxSize - 1 bytes, stores the characters in \a @@ -1243,10 +1227,6 @@ qint64 QIODevice::readLineData(char *data, qint64 maxSize) return readSoFar; } -#ifdef Q_CC_RVCT -#pragma pop -#endif - /*! Returns \c true if a complete line of data can be read from the device; otherwise returns \c false. diff --git a/src/corelib/kernel/qfunctions_p.h b/src/corelib/kernel/qfunctions_p.h index b10d92398b..d0623aab6b 100644 --- a/src/corelib/kernel/qfunctions_p.h +++ b/src/corelib/kernel/qfunctions_p.h @@ -57,14 +57,8 @@ # include "QtCore/qfunctions_winrt.h" #endif -#ifdef Q_CC_RVCT -// rvct doesn't see static operators when using our qalgorithms -# define Q_STATIC_GLOBAL_OPERATOR inline -# define Q_STATIC_GLOBAL_INLINE_OPERATOR inline -#else -# define Q_STATIC_GLOBAL_OPERATOR static -# define Q_STATIC_GLOBAL_INLINE_OPERATOR static inline -#endif +#define Q_STATIC_GLOBAL_OPERATOR static +#define Q_STATIC_GLOBAL_INLINE_OPERATOR static inline #endif diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h index c7b83a98cc..a49ae2fd9d 100644 --- a/src/corelib/tools/qbytearraymatcher.h +++ b/src/corelib/tools/qbytearraymatcher.h @@ -66,11 +66,6 @@ public: private: QByteArrayMatcherPrivate *d; QByteArray q_pattern; -#ifdef Q_CC_RVCT -// explicitly allow anonymous unions for RVCT to prevent compiler warnings -# pragma push -# pragma anon_unions -#endif struct Data { uchar q_skiptable[256]; const uchar *p; @@ -80,9 +75,6 @@ private: uint dummy[256]; Data p; }; -#ifdef Q_CC_RVCT -# pragma pop -#endif }; QT_END_NAMESPACE diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 771e81c8f4..325799d165 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -977,29 +977,11 @@ public: inline QMultiHash operator+(const QMultiHash &other) const { QMultiHash result = *this; result += other; return result; } -#if !defined(Q_CC_RVCT) - // RVCT compiler doesn't handle using-keyword right when used functions are overloaded in child class using QHash<Key, T>::contains; using QHash<Key, T>::remove; using QHash<Key, T>::count; using QHash<Key, T>::find; using QHash<Key, T>::constFind; -#else - inline bool contains(const Key &key) const - { return QHash<Key, T>::contains(key); } - inline int remove(const Key &key) - { return QHash<Key, T>::remove(key); } - inline int count(const Key &key) const - { return QHash<Key, T>::count(key); } - inline int count() const - { return QHash<Key, T>::count(); } - inline typename QHash<Key, T>::iterator find(const Key &key) - { return QHash<Key, T>::find(key); } - inline typename QHash<Key, T>::const_iterator find(const Key &key) const - { return QHash<Key, T>::find(key); } - inline typename QHash<Key, T>::const_iterator constFind(const Key &key) const - { return QHash<Key, T>::constFind(key); } -#endif bool contains(const Key &key, const T &value) const; diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index ce550c540b..4b1fc65b22 100644 --- a/src/corelib/tools/qmap.h +++ b/src/corelib/tools/qmap.h @@ -1157,29 +1157,11 @@ public: inline QMultiMap operator+(const QMultiMap &other) const { QMultiMap result = *this; result += other; return result; } -#if !defined(Q_CC_RVCT) - // RVCT compiler doesn't handle using-keyword right when used functions are overloaded in child class using QMap<Key, T>::contains; using QMap<Key, T>::remove; using QMap<Key, T>::count; using QMap<Key, T>::find; using QMap<Key, T>::constFind; -#else - inline bool contains(const Key &key) const - { return QMap<Key, T>::contains(key); } - inline int remove(const Key &key) - { return QMap<Key, T>::remove(key); } - inline int count(const Key &key) const - { return QMap<Key, T>::count(key); } - inline int count() const - { return QMap<Key, T>::count(); } - inline typename QMap<Key, T>::iterator find(const Key &key) - { return QMap<Key, T>::find(key); } - inline typename QMap<Key, T>::const_iterator find(const Key &key) const - { return QMap<Key, T>::find(key); } - inline typename QMap<Key, T>::const_iterator constFind(const Key &key) const - { return QMap<Key, T>::constFind(key); } -#endif bool contains(const Key &key, const T &value) const; diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h index 00e5fc1587..d416831434 100644 --- a/src/corelib/tools/qstringmatcher.h +++ b/src/corelib/tools/qstringmatcher.h @@ -66,11 +66,6 @@ private: QStringMatcherPrivate *d_ptr; QString q_pattern; Qt::CaseSensitivity q_cs; -#ifdef Q_CC_RVCT -// explicitly allow anonymous unions for RVCT to prevent compiler warnings -# pragma push -# pragma anon_unions -#endif struct Data { uchar q_skiptable[256]; const QChar *uc; @@ -80,9 +75,6 @@ private: uint q_data[256]; Data p; }; -#ifdef Q_CC_RVCT -# pragma pop -#endif }; QT_END_NAMESPACE diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index bd53952d1b..de4be7177b 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -2648,32 +2648,10 @@ static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Op return b; } -#if defined(Q_CC_RVCT) -// Force ARM code generation for comp_func_* -methods -# pragma push -# pragma arm -# if defined(Q_PROCESSOR_ARM_V6) -static __forceinline void preload(const uint *start) -{ - asm( "pld [start]" ); -} -static const uint L2CacheLineLength = 32; -static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint); -# define PRELOAD_INIT(x) preload(x); -# define PRELOAD_INIT2(x,y) PRELOAD_INIT(x) PRELOAD_INIT(y) -# define PRELOAD_COND(x) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); -// Two consecutive preloads stall, so space them out a bit by using different modulus. -# define PRELOAD_COND2(x,y) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); \ - if (((uint)&y[i])%L2CacheLineLength == 16) preload(&y[i] + L2CacheLineLengthInInts); -# endif // Q_PROCESSOR_ARM_V6 -#endif // Q_CC_RVCT - -#if !defined(Q_CC_RVCT) || !defined(Q_PROCESSOR_ARM_V6) # define PRELOAD_INIT(x) # define PRELOAD_INIT2(x,y) # define PRELOAD_COND(x) # define PRELOAD_COND2(x,y) -#endif /* The constant alpha factor describes an alpha factor that gets applied to the result of the composition operation combining it with the destination. @@ -3828,11 +3806,7 @@ static inline int soft_light_op(int dst, int src, int da, int sa) else if (4 * dst <= da) return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025; else { -# ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 - return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025; -# else return (dst * sa * 255 + da * (src2 - sa) * (int(qSqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025; -# endif } } @@ -4040,11 +4014,6 @@ void QT_FASTCALL comp_func_Exclusion(uint *Q_DECL_RESTRICT dest, const uint *Q_D comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha)); } -#if defined(Q_CC_RVCT) -// Restore pragma state from previous #pragma arm -# pragma pop -#endif - void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, int length, uint color, diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 695fbbdbbd..a2c8f9e7a1 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -59,12 +59,7 @@ QT_BEGIN_NAMESPACE -#if defined(Q_CC_RVCT) -// RVCT doesn't like static template functions -# define Q_STATIC_TEMPLATE_FUNCTION -# define Q_ALWAYS_INLINE __forceinline -# define Q_DECL_RESTRICT -#elif defined(Q_CC_GNU) +#if defined(Q_CC_GNU) # define Q_STATIC_TEMPLATE_FUNCTION static # define Q_ALWAYS_INLINE inline __attribute__((always_inline)) # define Q_DECL_RESTRICT __restrict__ @@ -555,10 +550,6 @@ public: } }; -#if defined(Q_CC_RVCT) -# pragma push -# pragma arm -#endif static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) { uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; @@ -570,9 +561,6 @@ static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b x |= t; return x; } -#if defined(Q_CC_RVCT) -# pragma pop -#endif #if QT_POINTER_SIZE == 8 // 64-bit versions @@ -604,10 +592,6 @@ static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b return x; } -#if defined(Q_CC_RVCT) -# pragma push -# pragma arm -#endif static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) { uint t = (x & 0xff00ff) * a; t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; @@ -619,10 +603,6 @@ static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) { x |= t; return x; } -#if defined(Q_CC_RVCT) -# pragma pop -#endif - #endif @@ -664,14 +644,7 @@ static Q_ALWAYS_INLINE uint BYTE_MUL_RGB16_32(uint x, uint a) { return t; } -#if defined(Q_CC_RVCT) -# pragma push -# pragma arm -#endif static Q_ALWAYS_INLINE int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; } -#if defined(Q_CC_RVCT) -# pragma pop -#endif static Q_ALWAYS_INLINE uint BYTE_MUL_RGB30(uint x, uint a) { uint xa = x >> 30; diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index b21bcee585..633d2ee9a8 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -615,13 +615,8 @@ QDebug operator<<(QDebug debug, const QNetworkInterface &networkInterface) << ", hardware address = " << networkInterface.hardwareAddress() << ", flags = "; flagsDebug(debug, networkInterface.flags()); -#if defined(Q_CC_RVCT) - // RVCT gets confused with << networkInterface.addressEntries(), reason unknown. - debug.nospace() << ")\n"; -#else debug.nospace() << ", entries = " << networkInterface.addressEntries() << ")\n"; -#endif return debug.space(); } #endif |