summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/qt.prf19
-rw-r--r--src/corelib/tools/qsimd.cpp4
-rw-r--r--src/corelib/tools/qsimd_p.h49
-rw-r--r--src/gui/gui.pro3
-rw-r--r--src/gui/image/qimage.cpp8
-rw-r--r--src/gui/image/qimage_avx.cpp2
-rw-r--r--src/gui/image/qimage_neon.cpp4
-rw-r--r--src/gui/image/qimage_sse2.cpp4
-rw-r--r--src/gui/image/qimage_ssse3.cpp4
-rw-r--r--src/gui/image/qjpeghandler.cpp8
-rw-r--r--src/gui/image/qpixmap_raster.cpp4
-rw-r--r--src/gui/painting/qdrawhelper.cpp26
-rw-r--r--src/gui/painting/qdrawhelper_avx.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_iwmmxt.cpp4
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp.cpp14
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp_p.h8
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp4
-rw-r--r--src/gui/painting/qdrawhelper_neon_p.h4
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp4
-rw-r--r--src/gui/painting/qdrawhelper_sse_p.h4
-rw-r--r--src/gui/painting/qdrawhelper_ssse3.cpp4
-rw-r--r--src/gui/painting/qdrawhelper_x86_p.h10
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h4
23 files changed, 109 insertions, 88 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index c69941357a..75196d6392 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -177,11 +177,14 @@ mac {
}
#SIMD defines:
-sse2:DEFINES += QT_HAVE_SSE2
-sse3:DEFINES += QT_HAVE_SSE3
-ssse3:DEFINES += QT_HAVE_SSSE3
-sse4_1:DEFINES += QT_HAVE_SSE4_1
-sse4_2:DEFINES += QT_HAVE_SSE4_2
-avx:DEFINES += QT_HAVE_AVX
-avx2:DEFINES += QT_HAVE_AVX2
-iwmmxt:DEFINES += QT_HAVE_IWMMXT
+sse2:DEFINES += QT_COMPILER_SUPPORTS_SSE2
+sse3:DEFINES += QT_COMPILER_SUPPORTS_SSE3
+ssse3:DEFINES += QT_COMPILER_SUPPORTS_SSSE3
+sse4_1:DEFINES += QT_COMPILER_SUPPORTS_SSE4_1
+sse4_2:DEFINES += QT_COMPILER_SUPPORTS_SSE4_2
+avx:DEFINES += QT_COMPILER_SUPPORTS_AVX
+avx2:DEFINES += QT_COMPILER_SUPPORTS_AVX2
+iwmmxt:DEFINES += QT_COMPILER_SUPPORTS_IWMMXT
+neon:DEFINES += QT_COMPILER_SUPPORTS_NEON
+mips_dsp:DEFINES += QT_COMPILER_SUPPORTS_MIPS_DSP
+mips_dspr2:DEFINES += QT_COMPILER_SUPPORTS_MIPS_DSPR2
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index dacff0fe87..b07667b4f9 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -102,7 +102,7 @@ static inline uint detectProcessorFeatures()
return features;
}
-#elif defined(Q_PROCESSOR_ARM) || defined(QT_HAVE_IWMMXT) || defined(QT_HAVE_NEON)
+#elif defined(Q_PROCESSOR_ARM) || defined(QT_COMPILER_SUPPORTS_IWMMXT) || defined(QT_COMPILER_SUPPORTS_NEON)
static inline uint detectProcessorFeatures()
{
uint features = 0;
@@ -136,7 +136,7 @@ static inline uint detectProcessorFeatures()
// fall back if /proc/self/auxv wasn't found
#endif
-#if defined(QT_HAVE_IWMMXT)
+#if defined(QT_COMPILER_SUPPORTS_IWMMXT)
// runtime detection only available when running as a previlegied process
features = IWMMXT;
#elif defined(QT_ALWAYS_HAVE_NEON)
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 6374e20135..f22558834b 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -46,12 +46,37 @@
QT_BEGIN_HEADER
+/*
+ * qt_module_config.prf defines the QT_COMPILER_SUPPORTS_XXX macros.
+ * They mean the compiler supports the necessary flags and the headers
+ * for the x86 and ARM intrinsics:
+ * - GCC: the -mXXX or march=YYY flag is necessary before #include
+ * - Intel CC: #include can happen unconditionally
+ * - MSVC: #include can happen unconditionally
+ * - RVCT: ???
+ *
+ * We will try to include all headers possible under this configuration.
+ *
+ * Supported XXX are:
+ * Flag | Arch | GCC | Intel CC | MSVC |
+ * NEON | ARM | I & C | None | ? |
+ * IWMMXT | ARM | I & C | None | I & C |
+ * SSE2 | x86 | I & C | I & C | I & C |
+ * SSE3 | x86 | I & C | I & C | I only |
+ * SSSE3 | x86 | I & C | I & C | I only |
+ * SSE4_1 | x86 | I & C | I & C | I only |
+ * SSE4_2 | x86 | I & C | I & C | I only |
+ * AVX | x86 | I & C | I & C | I & C |
+ * AVX2 | x86 | I & C | I & C | I only |
+ * I = intrinsics; C = code generation
+ */
+
#ifdef __MINGW64_VERSION_MAJOR
#include <intrin.h>
#endif
// SSE intrinsics
-#if defined(QT_HAVE_SSE2) && (defined(__SSE2__) || defined(Q_CC_MSVC))
+#if defined(__SSE2__) || (defined(QT_COMPILER_SUPPORTS_SSE2) && defined(Q_CC_MSVC))
#if defined(QT_LINUXBASE)
/// this is an evil hack - the posix_memalign declaration in LSB
/// is wrong - see http://bugs.linuxbase.org/show_bug.cgi?id=2431
@@ -61,38 +86,34 @@ QT_BEGIN_HEADER
#else
# include <emmintrin.h>
#endif
+#endif
// SSE3 intrinsics
-#if defined(QT_HAVE_SSE3) && (defined(__SSE3__) || defined(Q_CC_MSVC))
+#if defined(__SSE3__) || (defined(QT_COMPILER_SUPPORTS_SSE3) && defined(Q_CC_MSVC))
#include <pmmintrin.h>
#endif
// SSSE3 intrinsics
-#if defined(QT_HAVE_SSSE3) && (defined(__SSSE3__) || defined(Q_CC_MSVC))
+#if defined(__SSSE3__) || (defined(QT_COMPILER_SUPPORTS_SSSE3) && defined(Q_CC_MSVC))
#include <tmmintrin.h>
#endif
// SSE4.1 intrinsics
-#if defined(QT_HAVE_SSE4_1) && (defined(__SSE4_1__) || defined(Q_CC_MSVC))
+#if defined(__SSE4_1__) || (defined(QT_COMPILER_SUPPORTS_SSE4_1) && defined(Q_CC_MSVC))
#include <smmintrin.h>
#endif
// SSE4.2 intrinsics
-#if defined(QT_HAVE_SSE4_2) && (defined(__SSE4_2__) || defined(Q_CC_MSVC))
+#if defined(__SSE4_2__) || (defined(QT_COMPILER_SUPPORTS_SSE4_2) && defined(Q_CC_MSVC))
#include <nmmintrin.h>
#endif
// AVX intrinsics
-#if defined(QT_HAVE_AVX) && (defined(__AVX__) || defined(Q_CC_MSVC))
+#if defined(__AVX__) || (defined(QT_COMPILER_SUPPORTS_AVX) && defined(Q_CC_MSVC))
+// immintrin.h is the ultimate header, we don't need anything else after this
#include <immintrin.h>
#endif
-
-#if !defined(QT_BOOTSTRAPPED) && (!defined(Q_CC_MSVC) || (defined(_M_X64) || _M_IX86_FP == 2))
-#define QT_ALWAYS_HAVE_SSE2
-#endif
-#endif // defined(QT_HAVE_SSE2) && (defined(__SSE2__) || defined(Q_CC_MSVC))
-
// NEON intrinsics
#if defined __ARM_NEON__
#define QT_ALWAYS_HAVE_NEON
@@ -101,14 +122,14 @@ QT_BEGIN_HEADER
// IWMMXT intrinsics
-#if defined(QT_HAVE_IWMMXT)
+#if defined(QT_COMPILER_SUPPORTS_IWMMXT)
#include <mmintrin.h>
#if defined(Q_OS_WINCE)
# include "qplatformdefs.h"
#endif
#endif
-#if defined(QT_HAVE_IWMMXT)
+#if defined(QT_COMPILER_SUPPORTS_IWMMXT)
#if !defined(__IWMMXT__) && !defined(Q_OS_WINCE)
# include <xmmintrin.h>
#elif defined(Q_OS_WINCE_STD) && defined(_X86_)
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 67c21338ad..3accb0b593 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -39,7 +39,6 @@ include(animation/animation.pri)
QMAKE_LIBS += $$QMAKE_LIBS_GUI
neon:*-g++* {
- DEFINES += QT_HAVE_NEON
HEADERS += $$NEON_HEADERS
DRAWHELPER_NEON_ASM_FILES = $$NEON_ASM
@@ -115,12 +114,10 @@ win32:!contains(QT_CONFIG, directwrite) {
}
mips_dsp:*-g++* {
- DEFINES += QT_HAVE_MIPS_DSP
HEADERS += $$MIPS_DSP_HEADERS
DRAWHELPER_MIPS_DSP_ASM_FILES = $$MIPS_DSP_ASM
mips_dspr2 {
- DEFINES += QT_HAVE_MIPS_DSPR2
DRAWHELPER_MIPS_DSP_ASM_FILES += $$MIPS_DSPR2_ASM
}
mips_dsp_compiler.commands = $$QMAKE_CXX -c
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 2d70b28923..91af774eef 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -3272,8 +3272,8 @@ void qInitImageConversions()
const uint features = qDetectCPUFeatures();
Q_UNUSED(features);
-#ifdef QT_HAVE_SSE2
-#ifdef QT_HAVE_AVX
+#ifdef QT_COMPILER_SUPPORTS_SSE2
+#ifdef QT_COMPILER_SUPPORTS_AVX
if (features & AVX) {
extern bool convert_ARGB_to_ARGB_PM_inplace_avx(QImageData *data, Qt::ImageConversionFlags);
inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_avx;
@@ -3288,7 +3288,7 @@ void qInitImageConversions()
if (features & SSE2) {
extern bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionFlags);
inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_sse2;
-#ifdef QT_HAVE_SSSE3
+#ifdef QT_COMPILER_SUPPORTS_SSSE3
if (features & SSSE3) {
extern void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_ssse3;
@@ -3299,7 +3299,7 @@ void qInitImageConversions()
}
#endif // SSE2
-#ifdef QT_HAVE_NEON
+#ifdef QT_COMPILER_SUPPORTS_NEON
if (features & NEON) {
extern void convert_RGB888_to_RGB32_neon(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_neon;
diff --git a/src/gui/image/qimage_avx.cpp b/src/gui/image/qimage_avx.cpp
index f112a46d96..711508a1bc 100644
--- a/src/gui/image/qimage_avx.cpp
+++ b/src/gui/image/qimage_avx.cpp
@@ -41,7 +41,7 @@
#include <private/qsimd_p.h>
-#ifdef QT_HAVE_AVX
+#ifdef QT_COMPILER_SUPPORTS_AVX
#ifndef __AVX__
#error "AVX not enabled in this file, cannot proceed"
diff --git a/src/gui/image/qimage_neon.cpp b/src/gui/image/qimage_neon.cpp
index b19dfac3ec..73ee1f9533 100644
--- a/src/gui/image/qimage_neon.cpp
+++ b/src/gui/image/qimage_neon.cpp
@@ -43,7 +43,7 @@
#include <private/qimage_p.h>
#include <private/qsimd_p.h>
-#ifdef QT_HAVE_NEON
+#ifdef QT_COMPILER_SUPPORTS_NEON
QT_BEGIN_NAMESPACE
@@ -111,4 +111,4 @@ void convert_RGB888_to_RGB32_neon(QImageData *dest, const QImageData *src, Qt::I
QT_END_NAMESPACE
-#endif // QT_HAVE_NEON
+#endif // QT_COMPILER_SUPPORTS_NEON
diff --git a/src/gui/image/qimage_sse2.cpp b/src/gui/image/qimage_sse2.cpp
index 8a36bfb0d2..5d04d750b0 100644
--- a/src/gui/image/qimage_sse2.cpp
+++ b/src/gui/image/qimage_sse2.cpp
@@ -45,7 +45,7 @@
#include <private/qdrawhelper_p.h>
#include <private/qdrawingprimitive_sse2_p.h>
-#ifdef QT_HAVE_SSE2
+#ifdef QT_COMPILER_SUPPORTS_SSE2
QT_BEGIN_NAMESPACE
@@ -106,4 +106,4 @@ bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionF
QT_END_NAMESPACE
-#endif // QT_HAVE_SSE2
+#endif // QT_COMPILER_SUPPORTS_SSE2
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp
index 2ca80ef3bb..0fa2b4bb7b 100644
--- a/src/gui/image/qimage_ssse3.cpp
+++ b/src/gui/image/qimage_ssse3.cpp
@@ -43,7 +43,7 @@
#include <private/qimage_p.h>
#include <private/qsimd_p.h>
-#ifdef QT_HAVE_SSSE3
+#ifdef QT_COMPILER_SUPPORTS_SSSE3
QT_BEGIN_NAMESPACE
@@ -146,4 +146,4 @@ void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::
QT_END_NAMESPACE
-#endif // QT_HAVE_SSSE3
+#endif // QT_COMPILER_SUPPORTS_SSSE3
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index c42977ef10..eff106a486 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -875,20 +875,20 @@ QJpegHandler::QJpegHandler()
{
const uint features = qDetectCPUFeatures();
Q_UNUSED(features);
-#if defined(QT_HAVE_NEON)
+#if defined(QT_COMPILER_SUPPORTS_NEON)
// from qimage_neon.cpp
Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_neon(quint32 *dst, const uchar *src, int len);
if (features & NEON)
rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_neon;
-#endif // QT_HAVE_NEON
-#if defined(QT_HAVE_SSSE3)
+#endif // QT_COMPILER_SUPPORTS_NEON
+#if defined(QT_COMPILER_SUPPORTS_SSSE3)
// from qimage_ssse3.cpp
Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len);
if (features & SSSE3)
rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_ssse3;
-#endif // QT_HAVE_SSSE3
+#endif // QT_COMPILER_SUPPORTS_SSSE3
}
QJpegHandler::~QJpegHandler()
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 27f472d842..260deb4482 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -182,7 +182,7 @@ void QRasterPlatformPixmap::fill(const QColor &color)
if (alpha != 255) {
if (!image.hasAlphaChannel()) {
QImage::Format toFormat;
-#if !(defined(QT_HAVE_NEON) || defined(QT_ALWAYS_HAVE_SSE2))
+#if !(defined(QT_COMPILER_SUPPORTS_NEON) || defined(__SSE2__))
if (image.format() == QImage::Format_RGB16)
toFormat = QImage::Format_ARGB8565_Premultiplied;
else if (image.format() == QImage::Format_RGB666)
@@ -303,7 +303,7 @@ void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageC
QImage::Format opaqueFormat = QNativeImage::systemFormat();
QImage::Format alphaFormat = QImage::Format_ARGB32_Premultiplied;
-#if !defined(QT_HAVE_NEON) && !defined(QT_ALWAYS_HAVE_SSE2)
+#if !defined(QT_COMPILER_SUPPORTS_NEON) && !defined(__SSE2__)
switch (opaqueFormat) {
case QImage::Format_RGB16:
alphaFormat = QImage::Format_ARGB8565_Premultiplied;
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 23a1853314..8888883e51 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -56,7 +56,7 @@
#include <private/qpainter_p.h>
#include <private/qdrawhelper_x86_p.h>
#include <private/qdrawhelper_neon_p.h>
-#ifdef QT_HAVE_MIPS_DSP
+#ifdef QT_COMPILER_SUPPORTS_MIPS_DSP
#include <private/qdrawhelper_mips_dsp_p.h>
#endif
#include <private/qmath_p.h>
@@ -555,7 +555,7 @@ static const uint *QT_FASTCALL fetchUntransformedRGB16(uint *buffer, const Opera
int length)
{
const quint16 *scanLine = (const quint16 *)data->texture.scanLine(y) + x;
-#ifdef QT_HAVE_MIPS_DSPR2
+#ifdef QT_COMPILER_SUPPORTS_MIPS_DSPR2
qConvertRgb16To32_asm_mips_dspr2(buffer, scanLine, length);
#else
for (int i = 0; i < length; ++i)
@@ -5805,7 +5805,7 @@ void qInitDrawhelperAsm()
const uint features = qDetectCPUFeatures();
if (false) {
-#ifdef QT_HAVE_AVX
+#ifdef QT_COMPILER_SUPPORTS_AVX
} else if (features & AVX) {
qt_memfill32 = qt_memfill32_avx;
qt_memfill16 = qt_memfill16_avx;
@@ -5823,7 +5823,7 @@ void qInitDrawhelperAsm()
qScaleFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_avx;
qScaleFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_avx;
#endif
-#ifdef QT_HAVE_SSE2
+#ifdef QT_COMPILER_SUPPORTS_SSE2
} else if (features & SSE2) {
qt_memfill32 = qt_memfill32_sse2;
qt_memfill16 = qt_memfill16_sse2;
@@ -5843,7 +5843,7 @@ void qInitDrawhelperAsm()
#endif
}
-#ifdef QT_HAVE_SSE2
+#ifdef QT_COMPILER_SUPPORTS_SSE2
if (features & SSE2) {
extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
@@ -5865,7 +5865,7 @@ void qInitDrawhelperAsm()
qt_fetch_radial_gradient = qt_fetch_radial_gradient_sse2;
}
-#ifdef QT_HAVE_SSSE3
+#ifdef QT_COMPILER_SUPPORTS_SSSE3
if (features & SSSE3) {
extern void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
@@ -5877,7 +5877,7 @@ void qInitDrawhelperAsm()
}
#endif // SSSE3
-#ifdef QT_HAVE_AVX
+#ifdef QT_COMPILER_SUPPORTS_AVX
if (features & AVX) {
extern void qt_blend_rgb32_on_rgb32_avx(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
@@ -5902,13 +5902,13 @@ void qInitDrawhelperAsm()
#endif // SSE2
-#ifdef QT_HAVE_SSE2
+#ifdef QT_COMPILER_SUPPORTS_SSE2
if (features & SSE2) {
functionForModeAsm = qt_functionForMode_SSE2;
functionForModeSolidAsm = qt_functionForModeSolid_SSE2;
}
#endif
-#ifdef QT_HAVE_AVX
+#ifdef QT_COMPILER_SUPPORTS_AVX
if (features & AVX) {
extern void QT_FASTCALL comp_func_SourceOver_avx(uint *destPixels,
const uint *srcPixels,
@@ -5925,7 +5925,7 @@ void qInitDrawhelperAsm()
}
#endif // SSE2
-#ifdef QT_HAVE_IWMMXT
+#ifdef QT_COMPILER_SUPPORTS_IWMMXT
if (features & IWMMXT) {
functionForModeAsm = qt_functionForMode_IWMMXT;
functionForModeSolidAsm = qt_functionForModeSolid_IWMMXT;
@@ -5933,7 +5933,7 @@ void qInitDrawhelperAsm()
}
#endif // IWMMXT
-#if defined(QT_HAVE_NEON)
+#if defined(QT_COMPILER_SUPPORTS_NEON)
if (features & NEON) {
qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
@@ -5968,7 +5968,7 @@ void qInitDrawhelperAsm()
}
#endif
-#if defined(QT_HAVE_MIPS_DSP)
+#if defined(QT_COMPILER_SUPPORTS_MIPS_DSP)
functionForMode_C[QPainter::CompositionMode_SourceOver] = comp_func_SourceOver_asm_mips_dsp;
functionForMode_C[QPainter::CompositionMode_Source] = comp_func_Source_mips_dsp;
@@ -5983,7 +5983,7 @@ void qInitDrawhelperAsm()
destStoreProc[QImage::Format_ARGB32] = qt_destStoreARGB32_mips_dsp;
-#endif // QT_HAVE_MIPS_DSP
+#endif // QT_COMPILER_SUPPORTS_MIPS_DSP
if (functionForModeSolidAsm) {
const int destinationMode = QPainter::CompositionMode_Destination;
functionForModeSolidAsm[destinationMode] = functionForModeSolid_C[destinationMode];
diff --git a/src/gui/painting/qdrawhelper_avx.cpp b/src/gui/painting/qdrawhelper_avx.cpp
index 28ba5f8aa3..ab1ee94784 100644
--- a/src/gui/painting/qdrawhelper_avx.cpp
+++ b/src/gui/painting/qdrawhelper_avx.cpp
@@ -41,7 +41,7 @@
#include <private/qsimd_p.h>
-#ifdef QT_HAVE_AVX
+#ifdef QT_COMPILER_SUPPORTS_AVX
#define QDRAWHELPER_AVX
#ifndef __AVX__
diff --git a/src/gui/painting/qdrawhelper_iwmmxt.cpp b/src/gui/painting/qdrawhelper_iwmmxt.cpp
index 83764b41f2..0c70a3f8ef 100644
--- a/src/gui/painting/qdrawhelper_iwmmxt.cpp
+++ b/src/gui/painting/qdrawhelper_iwmmxt.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifdef QT_HAVE_IWMMXT
+#ifdef QT_COMPILER_SUPPORTS_IWMMXT
#include <mmintrin.h>
#if defined(Q_OS_WINCE)
@@ -143,6 +143,6 @@ void qt_blend_color_argb_iwmmxt(int count, const QSpan *spans, void *userData)
(CompositionFunctionSolid*)qt_functionForModeSolid_IWMMXT);
}
-#endif // QT_HAVE_IWMMXT
+#endif // QT_COMPILER_SUPPORTS_IWMMXT
QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper_mips_dsp.cpp b/src/gui/painting/qdrawhelper_mips_dsp.cpp
index 9b104eb5c9..b33329c090 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp.cpp
+++ b/src/gui/painting/qdrawhelper_mips_dsp.cpp
@@ -45,7 +45,7 @@
QT_BEGIN_NAMESPACE
-#if defined(QT_HAVE_MIPS_DSP)
+#if defined(QT_COMPILER_SUPPORTS_MIPS_DSP)
extern "C" uint INTERPOLATE_PIXEL_255_asm_mips_dsp(uint x, uint a, uint y, uint b);
@@ -55,13 +55,13 @@ extern "C" uint * destfetchARGB32_asm_mips_dsp(uint *buffer, const uint *data, i
extern "C" uint * qt_destStoreARGB32_asm_mips_dsp(uint *buffer, const uint *data, int length);
-#if defined(QT_HAVE_MIPS_DSPR2)
+#if defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2)
extern "C" uint INTERPOLATE_PIXEL_255_asm_mips_dspr2(uint x, uint a, uint y, uint b);
extern "C" uint BYTE_MUL_asm_mips_dspr2(uint x, uint a);
-#endif // QT_HAVE_MIPS_DSPR2
+#endif // QT_COMPILER_SUPPORTS_MIPS_DSPR2
void qt_blend_argb32_on_argb32_mips_dsp(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
@@ -85,7 +85,7 @@ void qt_blend_argb32_on_argb32_mips_dsp(uchar *destPixels, int dbpl,
if (s >= 0xff000000)
dst[x] = s;
else if (s != 0)
-#if !defined(QT_HAVE_MIPS_DSPR2)
+#if !defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2)
dst[x] = s + BYTE_MUL_asm_mips_dsp(dst[x], qAlpha(~s));
#else
dst[x] = s + BYTE_MUL_asm_mips_dspr2(dst[x], qAlpha(~s));
@@ -98,7 +98,7 @@ void qt_blend_argb32_on_argb32_mips_dsp(uchar *destPixels, int dbpl,
const_alpha = (const_alpha * 255) >> 8;
for (int y=0; y<h; ++y) {
for (int x=0; x<w; ++x) {
-#if !defined(QT_HAVE_MIPS_DSPR2)
+#if !defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2)
uint s = BYTE_MUL_asm_mips_dsp(src[x], const_alpha);
dst[x] = s + BYTE_MUL_asm_mips_dsp(dst[x], qAlpha(~s));
#else
@@ -146,7 +146,7 @@ void comp_func_Source_mips_dsp(uint *dest, const uint *src, int length, uint con
} else {
int ialpha = 255 - const_alpha;
for (int i = 0; i < length; ++i) {
-#if !defined(QT_HAVE_MIPS_DSPR2)
+#if !defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2)
dest[i] = INTERPOLATE_PIXEL_255_asm_mips_dsp(src[i], const_alpha, dest[i], ialpha);
#else
dest[i] = INTERPOLATE_PIXEL_255_asm_mips_dspr2(src[i], const_alpha, dest[i], ialpha);
@@ -171,6 +171,6 @@ void QT_FASTCALL qt_destStoreARGB32_mips_dsp(QRasterBuffer *rasterBuffer, int x,
qt_destStoreARGB32_asm_mips_dsp(data, buffer, length);
}
-#endif // QT_HAVE_MIPS_DSP
+#endif // QT_COMPILER_SUPPORTS_MIPS_DSP
QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper_mips_dsp_p.h b/src/gui/painting/qdrawhelper_mips_dsp_p.h
index 55affca5d4..1a1e151cb5 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp_p.h
+++ b/src/gui/painting/qdrawhelper_mips_dsp_p.h
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
-#if defined(QT_HAVE_MIPS_DSP)
+#if defined(QT_COMPILER_SUPPORTS_MIPS_DSP)
extern "C" void qt_memfill32_asm_mips_dsp(quint32 *dest, quint32 value, int count);
@@ -71,13 +71,13 @@ uint * QT_FASTCALL qt_destFetchARGB32_mips_dsp(uint *buffer,
void QT_FASTCALL qt_destStoreARGB32_mips_dsp(QRasterBuffer *rasterBuffer, int x, int y,
const uint *buffer, int length);
-#ifdef QT_HAVE_MIPS_DSPR2
+#ifdef QT_COMPILER_SUPPORTS_MIPS_DSPR2
extern "C" void qConvertRgb16To32_asm_mips_dspr2(quint32 *dest, const quint16 *src, int length);
-#endif // QT_HAVE_MIPS_DSPR2
+#endif // QT_COMPILER_SUPPORTS_MIPS_DSPR2
-#endif // QT_HAVE_MIPS_DSP
+#endif // QT_COMPILER_SUPPORTS_MIPS_DSP
QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index 895b44dc17..d99645bbf6 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -43,7 +43,7 @@
#include <private/qblendfunctions_p.h>
#include <private/qmath_p.h>
-#ifdef QT_HAVE_NEON
+#ifdef QT_COMPILER_SUPPORTS_NEON
#include <private/qdrawhelper_neon_p.h>
#include <private/qpaintengine_raster_p.h>
@@ -997,5 +997,5 @@ const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer, const Opera
QT_END_NAMESPACE
-#endif // QT_HAVE_NEON
+#endif // QT_COMPILER_SUPPORTS_NEON
diff --git a/src/gui/painting/qdrawhelper_neon_p.h b/src/gui/painting/qdrawhelper_neon_p.h
index d62c73196f..54e889d847 100644
--- a/src/gui/painting/qdrawhelper_neon_p.h
+++ b/src/gui/painting/qdrawhelper_neon_p.h
@@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
-#ifdef QT_HAVE_NEON
+#ifdef QT_COMPILER_SUPPORTS_NEON
void qt_blend_argb32_on_argb32_neon(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
@@ -139,7 +139,7 @@ void QT_FASTCALL qt_destStoreRGB16_neon(QRasterBuffer *rasterBuffer,
void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_Plus_neon(uint *dst, const uint *src, int length, uint const_alpha);
-#endif // QT_HAVE_NEON
+#endif // QT_COMPILER_SUPPORTS_NEON
QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index e44116570d..ff3c7c0380 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -41,7 +41,7 @@
#include <private/qdrawhelper_x86_p.h>
-#ifdef QT_HAVE_SSE2
+#ifdef QT_COMPILER_SUPPORTS_SSE2
#include <private/qdrawingprimitive_sse2_p.h>
#include <private/qpaintengine_raster_p.h>
@@ -663,4 +663,4 @@ void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl,
QT_END_NAMESPACE
-#endif // QT_HAVE_SSE2
+#endif // QT_COMPILER_SUPPORTS_SSE2
diff --git a/src/gui/painting/qdrawhelper_sse_p.h b/src/gui/painting/qdrawhelper_sse_p.h
index 494ee70fcb..0f7bf7c7f8 100644
--- a/src/gui/painting/qdrawhelper_sse_p.h
+++ b/src/gui/painting/qdrawhelper_sse_p.h
@@ -55,7 +55,7 @@
#include <private/qdrawhelper_mmx_p.h>
-#ifdef QT_HAVE_SSE
+#ifdef QT_COMPILER_SUPPORTS_SSE
#ifdef QT_LINUXBASE
// this is an evil hack - the posix_memalign declaration in LSB
@@ -178,5 +178,5 @@ inline void qt_bitmapblit16_sse_template(QRasterBuffer *rasterBuffer,
QT_END_NAMESPACE
-#endif // QT_HAVE_SSE
+#endif // QT_COMPILER_SUPPORTS_SSE
#endif // QDRAWHELPER_SSE_P_H
diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp
index bc88e397da..57b99c22a0 100644
--- a/src/gui/painting/qdrawhelper_ssse3.cpp
+++ b/src/gui/painting/qdrawhelper_ssse3.cpp
@@ -41,7 +41,7 @@
#include <private/qdrawhelper_x86_p.h>
-#ifdef QT_HAVE_SSSE3
+#ifdef QT_COMPILER_SUPPORTS_SSSE3
#include <private/qdrawingprimitive_sse2_p.h>
@@ -180,4 +180,4 @@ void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl,
QT_END_NAMESPACE
-#endif // QT_HAVE_SSSE3
+#endif // QT_COMPILER_SUPPORTS_SSSE3
diff --git a/src/gui/painting/qdrawhelper_x86_p.h b/src/gui/painting/qdrawhelper_x86_p.h
index eb434e5fda..d368e6fef0 100644
--- a/src/gui/painting/qdrawhelper_x86_p.h
+++ b/src/gui/painting/qdrawhelper_x86_p.h
@@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
-#ifdef QT_HAVE_SSE2
+#ifdef QT_COMPILER_SUPPORTS_SSE2
void qt_memfill32_sse2(quint32 *dest, quint32 value, int count);
void qt_memfill16_sse2(quint16 *dest, quint16 value, int count);
void qt_bitmapblit32_sse2(QRasterBuffer *rasterBuffer, int x, int y,
@@ -77,9 +77,9 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
extern CompositionFunction qt_functionForMode_SSE2[];
extern CompositionFunctionSolid qt_functionForModeSolid_SSE2[];
-#endif // QT_HAVE_SSE2
+#endif // QT_COMPILER_SUPPORTS_SSE2
-#ifdef QT_HAVE_AVX
+#ifdef QT_COMPILER_SUPPORTS_AVX
void qt_memfill32_avx(quint32 *dest, quint32 value, int count);
void qt_memfill16_avx(quint16 *dest, quint16 value, int count);
void qt_bitmapblit32_avx(QRasterBuffer *rasterBuffer, int x, int y,
@@ -96,9 +96,9 @@ void qt_blend_rgb32_on_rgb32_avx(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
int w, int h,
int const_alpha);
-#endif // QT_HAVE_AVX
+#endif // QT_COMPILER_SUPPORTS_AVX
-#ifdef QT_HAVE_IWMMXT
+#ifdef QT_COMPILER_SUPPORTS_IWMMXT
void qt_blend_color_argb_iwmmxt(int count, const QSpan *spans, void *userData);
extern CompositionFunction qt_functionForMode_IWMMXT[];
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index 25d025eb39..28d0b9115a 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -44,7 +44,7 @@
#include <private/qsimd_p.h>
-#ifdef QT_HAVE_SSE2
+#ifdef QT_COMPILER_SUPPORTS_SSE2
//
// W A R N I N G
@@ -242,6 +242,6 @@ QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
-#endif // QT_HAVE_SSE2
+#endif // QT_COMPILER_SUPPORTS_SSE2
#endif // QDRAWINGPRIMITIVE_SSE2_P_H