From 099f2868701932ee99b60d19429d9c43f96dcadc Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 19 Jan 2017 11:14:47 +0100 Subject: Fix MIPS DSP configuration The patch fixes a number of bugs in code, and removes dead logic clarifying that MIPS DSP, like ARM NEON, has no runtime detecton. Change-Id: If2f4eea68da5b2eaa80b8e9c8258206d8c1b7173 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- config.tests/unix/mips_dsp/mips_dsp.cpp | 45 -------------- config.tests/unix/mips_dsp/mips_dsp.pro | 2 - config.tests/unix/mips_dspr2/mips_dspr2.cpp | 47 --------------- config.tests/unix/mips_dspr2/mips_dspr2.pro | 2 - configure.json | 13 ++-- configure.pri | 5 +- mkspecs/common/gcc-base.conf | 2 + src/corelib/tools/qsimd_p.h | 9 +++ src/gui/image/qimage_conversions.cpp | 18 +++--- src/gui/painting/qdrawhelper.cpp | 94 ++++++++++++++--------------- src/gui/painting/qdrawhelper_mips_dsp.cpp | 15 ++++- src/gui/painting/qdrawhelper_mips_dsp_p.h | 12 ++-- 12 files changed, 94 insertions(+), 170 deletions(-) delete mode 100644 config.tests/unix/mips_dsp/mips_dsp.cpp delete mode 100644 config.tests/unix/mips_dsp/mips_dsp.pro delete mode 100644 config.tests/unix/mips_dspr2/mips_dspr2.cpp delete mode 100644 config.tests/unix/mips_dspr2/mips_dspr2.pro diff --git a/config.tests/unix/mips_dsp/mips_dsp.cpp b/config.tests/unix/mips_dsp/mips_dsp.cpp deleted file mode 100644 index 4a3ce25672..0000000000 --- a/config.tests/unix/mips_dsp/mips_dsp.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the config.tests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -int main(int, char**) -{ - int result; - __builtin_mips_lhx(&result, 10); - return result; -} diff --git a/config.tests/unix/mips_dsp/mips_dsp.pro b/config.tests/unix/mips_dsp/mips_dsp.pro deleted file mode 100644 index 428b106c46..0000000000 --- a/config.tests/unix/mips_dsp/mips_dsp.pro +++ /dev/null @@ -1,2 +0,0 @@ -SOURCES = mips_dsp.cpp -CONFIG -= x11 qt diff --git a/config.tests/unix/mips_dspr2/mips_dspr2.cpp b/config.tests/unix/mips_dspr2/mips_dspr2.cpp deleted file mode 100644 index 1cf95681bb..0000000000 --- a/config.tests/unix/mips_dspr2/mips_dspr2.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the config.tests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -int main(int, char**) -{ - int result, tmp1, tmp2; - tmp1 = 10; - tmp2 = 20; - result = __builtin_mips_append (tmp1, tmp2, 10); - return result; -} diff --git a/config.tests/unix/mips_dspr2/mips_dspr2.pro b/config.tests/unix/mips_dspr2/mips_dspr2.pro deleted file mode 100644 index a938742229..0000000000 --- a/config.tests/unix/mips_dspr2/mips_dspr2.pro +++ /dev/null @@ -1,2 +0,0 @@ -SOURCES = mips_dspr2.cpp -CONFIG -= x11 qt diff --git a/configure.json b/configure.json index 7d04f0a516..e9ffc972ab 100644 --- a/configure.json +++ b/configure.json @@ -192,7 +192,7 @@ "detectPkgConfig": [ "cross_compile", "machineTuple" ], "library": [ "pkg-config" ], "getPkgConfigVariable": [ "pkg-config" ], - "neon": [ "architecture" ] + "subarch": [ "architecture" ] }, "testTypeAliases": { @@ -379,17 +379,18 @@ }, "mips_dsp": { "label": "MIPS DSP instructions", - "type": "compile", - "test": "unix/mips_dsp" + "type": "subarch", + "subarch": "dsp" }, "mips_dspr2": { "label": "MIPS DSPr2 instructions", - "type": "compile", - "test": "common/mips_dspr2" + "type": "subarch", + "subarch": "dspr2" }, "neon": { "label": "NEON instructions", - "type": "neon" + "type": "subarch", + "subarch": "neon" }, "mremap": { diff --git a/configure.pri b/configure.pri index 94aea44b13..b7dd9d460f 100644 --- a/configure.pri +++ b/configure.pri @@ -369,8 +369,9 @@ defineTest(qtConfTest_detectPkgConfig) { return(true) } -defineTest(qtConfTest_neon) { - contains($${currentConfig}.tests.architecture.subarch, "neon"): return(true) +defineTest(qtConfTest_subarch) { + subarch = $$eval($${1}.subarch) + contains($${currentConfig}.tests.architecture.subarch, $${subarch}): return(true) return(false) } diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf index 6e043f558f..52667f130e 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -96,6 +96,8 @@ QMAKE_CFLAGS_AVX512VL += -mavx512vl QMAKE_CFLAGS_AVX512IFMA += -mavx512ifma QMAKE_CFLAGS_AVX512VBMI += -mavx512vbmi QMAKE_CFLAGS_NEON += -mfpu=neon +QMAKE_CFLAGS_MIPS_DSP += -mdsp +QMAKE_CFLAGS_MIPS_DSPR2 += -mdspr2 # Wrapper tools that understand .o/.a files with GIMPLE instead of machine code QMAKE_AR_LTCG = gcc-ar cqs diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 3b6c85ca8a..f9c4d0d5ce 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -156,6 +156,15 @@ # if !defined(__ARM_FEATURE_NEON) && defined(__ARM_NEON__) # define __ARM_FEATURE_NEON // also support QT_COMPILER_SUPPORTS_HERE(NEON) # endif +#elif defined(Q_PROCESSOR_MIPS) +# define QT_COMPILER_SUPPORTS_HERE(x) (__ ## x ## __) +# define QT_FUNCTION_TARGET(x) +# if !defined(__MIPS_DSP__) && defined(__mips_dsp) && defined(Q_PROCESSOR_MIPS_32) +# define __MIPS_DSP__ +# endif +# if !defined(__MIPS_DSPR2__) && defined(__mips_dspr2) && defined(Q_PROCESSOR_MIPS_32) +# define __MIPS_DSPR2__ +# endif #elif (defined(Q_CC_INTEL) || defined(Q_CC_MSVC) \ || (defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && (__GNUC__-0) * 100 + (__GNUC_MINOR__-0) >= 409)) \ && !defined(QT_BOOTSTRAPPED) diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp index c646ee96b4..9c9db9a245 100644 --- a/src/gui/image/qimage_conversions.cpp +++ b/src/gui/image/qimage_conversions.cpp @@ -2984,16 +2984,14 @@ static void qInitImageConversions() qimage_converter_map[QImage::Format_RGB888][QImage::Format_ARGB32_Premultiplied] = convert_RGB888_to_RGB32_neon; #endif -#ifdef QT_COMPILER_SUPPORTS_MIPS_DSPR2 - if (qCpuHasFeature(DSPR2)) { - extern bool convert_ARGB_to_ARGB_PM_inplace_mips_dspr2(QImageData *data, Qt::ImageConversionFlags); - qimage_inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_mips_dspr2; - - extern void convert_RGB888_to_RGB32_mips_dspr2(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags); - qimage_converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_mips_dspr2; - qimage_converter_map[QImage::Format_RGB888][QImage::Format_ARGB32] = convert_RGB888_to_RGB32_mips_dspr2; - qimage_converter_map[QImage::Format_RGB888][QImage::Format_ARGB32_Premultiplied] = convert_RGB888_to_RGB32_mips_dspr2; - } +#if defined(__MIPS_DSPR2__) + extern bool convert_ARGB_to_ARGB_PM_inplace_mips_dspr2(QImageData *data, Qt::ImageConversionFlags); + qimage_inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_mips_dspr2; + + extern void convert_RGB888_to_RGB32_mips_dspr2(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags); + qimage_converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_mips_dspr2; + qimage_converter_map[QImage::Format_RGB888][QImage::Format_ARGB32] = convert_RGB888_to_RGB32_mips_dspr2; + qimage_converter_map[QImage::Format_RGB888][QImage::Format_ARGB32_Premultiplied] = convert_RGB888_to_RGB32_mips_dspr2; #endif } diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 298304c4ef..7b3e1b991d 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -1539,12 +1539,8 @@ static const uint *QT_FASTCALL fetchUntransformedRGB16(uint *buffer, const Opera int length) { const quint16 *scanLine = (const quint16 *)data->texture.scanLine(y) + x; -#ifdef QT_COMPILER_SUPPORTS_MIPS_DSPR2 - qConvertRgb16To32_asm_mips_dspr2(buffer, scanLine, length); -#else for (int i = 0; i < length; ++i) buffer[i] = qConvertRgb16To32(scanLine[i]); -#endif return buffer; } @@ -6030,7 +6026,7 @@ void qt_memfill16(quint16 *dest, quint16 color, int count) qt_memfill_template(dest, color, count); } #endif -#if !defined(__SSE2__) && !defined(__ARM_NEON__) && !defined(__mips_dsp) +#if !defined(__SSE2__) && !defined(__ARM_NEON__) && !defined(__MIPS_DSP__) void qt_memfill32(quint32 *dest, quint32 color, int count) { qt_memfill_template(dest, color, count); @@ -6222,52 +6218,50 @@ static void qInitDrawhelperFunctions() qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon; qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon; #endif - -#endif - -#if defined(QT_COMPILER_SUPPORTS_MIPS_DSP) || defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2) - if (qCpuHasFeature(DSP) && qCpuHasFeature(DSPR2)) { - // Composition functions are all DSP r1 - qt_functionForMode_C[QPainter::CompositionMode_SourceOver] = comp_func_SourceOver_asm_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_Source] = comp_func_Source_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_DestinationOver] = comp_func_DestinationOver_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_SourceIn] = comp_func_SourceIn_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_DestinationIn] = comp_func_DestinationIn_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_DestinationOut] = comp_func_DestinationOut_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_SourceAtop] = comp_func_SourceAtop_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_DestinationAtop] = comp_func_DestinationAtop_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_Xor] = comp_func_XOR_mips_dsp; - qt_functionForMode_C[QPainter::CompositionMode_SourceOut] = comp_func_SourceOut_mips_dsp; - - qt_functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_mips_dsp; - qt_functionForModeSolid_C[QPainter::CompositionMode_DestinationOver] = comp_func_solid_DestinationOver_mips_dsp; - qt_functionForModeSolid_C[QPainter::CompositionMode_SourceIn] = comp_func_solid_SourceIn_mips_dsp; - qt_functionForModeSolid_C[QPainter::CompositionMode_DestinationIn] = comp_func_solid_DestinationIn_mips_dsp; - qt_functionForModeSolid_C[QPainter::CompositionMode_SourceAtop] = comp_func_solid_SourceAtop_mips_dsp; - qt_functionForModeSolid_C[QPainter::CompositionMode_DestinationAtop] = comp_func_solid_DestinationAtop_mips_dsp; - qt_functionForModeSolid_C[QPainter::CompositionMode_Xor] = comp_func_solid_XOR_mips_dsp; - qt_functionForModeSolid_C[QPainter::CompositionMode_SourceOut] = comp_func_solid_SourceOut_mips_dsp; - - qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; - qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; - - destFetchProc[QImage::Format_ARGB32] = qt_destFetchARGB32_mips_dsp; - - destStoreProc[QImage::Format_ARGB32] = qt_destStoreARGB32_mips_dsp; - - sourceFetchUntransformed[QImage::Format_RGB888] = qt_fetchUntransformed_888_mips_dsp; - sourceFetchUntransformed[QImage::Format_RGB444] = qt_fetchUntransformed_444_mips_dsp; - sourceFetchUntransformed[QImage::Format_ARGB8565_Premultiplied] = qt_fetchUntransformed_argb8565_premultiplied_mips_dsp; - -#if defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2) - qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_mips_dspr2; +#endif // defined(__ARM_NEON__) + +#if defined(__MIPS_DSP__) + // Composition functions are all DSP r1 + qt_functionForMode_C[QPainter::CompositionMode_SourceOver] = comp_func_SourceOver_asm_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_Source] = comp_func_Source_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_DestinationOver] = comp_func_DestinationOver_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_SourceIn] = comp_func_SourceIn_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_DestinationIn] = comp_func_DestinationIn_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_DestinationOut] = comp_func_DestinationOut_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_SourceAtop] = comp_func_SourceAtop_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_DestinationAtop] = comp_func_DestinationAtop_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_Xor] = comp_func_XOR_mips_dsp; + qt_functionForMode_C[QPainter::CompositionMode_SourceOut] = comp_func_SourceOut_mips_dsp; + + qt_functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_mips_dsp; + qt_functionForModeSolid_C[QPainter::CompositionMode_DestinationOver] = comp_func_solid_DestinationOver_mips_dsp; + qt_functionForModeSolid_C[QPainter::CompositionMode_SourceIn] = comp_func_solid_SourceIn_mips_dsp; + qt_functionForModeSolid_C[QPainter::CompositionMode_DestinationIn] = comp_func_solid_DestinationIn_mips_dsp; + qt_functionForModeSolid_C[QPainter::CompositionMode_SourceAtop] = comp_func_solid_SourceAtop_mips_dsp; + qt_functionForModeSolid_C[QPainter::CompositionMode_DestinationAtop] = comp_func_solid_DestinationAtop_mips_dsp; + qt_functionForModeSolid_C[QPainter::CompositionMode_Xor] = comp_func_solid_XOR_mips_dsp; + qt_functionForModeSolid_C[QPainter::CompositionMode_SourceOut] = comp_func_solid_SourceOut_mips_dsp; + + qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; + qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; + + destFetchProc[QImage::Format_ARGB32] = qt_destFetchARGB32_mips_dsp; + + destStoreProc[QImage::Format_ARGB32] = qt_destStoreARGB32_mips_dsp; + + sourceFetchUntransformed[QImage::Format_RGB888] = qt_fetchUntransformed_888_mips_dsp; + sourceFetchUntransformed[QImage::Format_RGB444] = qt_fetchUntransformed_444_mips_dsp; + sourceFetchUntransformed[QImage::Format_ARGB8565_Premultiplied] = qt_fetchUntransformed_argb8565_premultiplied_mips_dsp; + +#if defined(__MIPS_DSPR2__) + qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_mips_dspr2; + sourceFetchUntransformed[QImage::Format_RGB16] = qt_fetchUntransformedRGB16_mips_dspr2; #else - qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_mips_dsp; -#endif // QT_COMPILER_SUPPORTS_MIPS_DSPR2 - } -#endif // QT_COMPILER_SUPPORTS_MIPS_DSP || QT_COMPILER_SUPPORTS_MIPS_DSPR2 + qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_mips_dsp; +#endif // defined(__MIPS_DSPR2__) +#endif // defined(__MIPS_DSP__) } // Ensure initialization if this object file is linked. diff --git a/src/gui/painting/qdrawhelper_mips_dsp.cpp b/src/gui/painting/qdrawhelper_mips_dsp.cpp index 783e481296..e92a6606de 100644 --- a/src/gui/painting/qdrawhelper_mips_dsp.cpp +++ b/src/gui/painting/qdrawhelper_mips_dsp.cpp @@ -113,7 +113,7 @@ void qt_blend_rgb32_on_rgb32_mips_dsp(uchar *destPixels, int dbpl, } } -#if defined QT_COMPILER_SUPPORTS_MIPS_DSPR2 +#if defined(__MIPS_DSPR2__) void qt_blend_rgb16_on_rgb16_mips_dspr2(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, @@ -521,4 +521,17 @@ const uint * QT_FASTCALL qt_fetchUntransformed_argb8565_premultiplied_mips_dsp ( return buffer; } +#if defined(__MIPS_DSPR2__) +extern "C" void qConvertRgb16To32_asm_mips_dspr2(quint32 *dest, const quint16 *src, int length); + +const uint *QT_FASTCALL qt_fetchUntransformedRGB16_mips_dspr2(uint *buffer, const Operator *, + const QSpanData *data, int y, int x, + int length) +{ + const quint16 *scanLine = (const quint16 *)data->texture.scanLine(y) + x; + qConvertRgb16To32_asm_mips_dspr2(buffer, scanLine, length); + return buffer; +} +#endif + QT_END_NAMESPACE diff --git a/src/gui/painting/qdrawhelper_mips_dsp_p.h b/src/gui/painting/qdrawhelper_mips_dsp_p.h index 86773ad25f..36c4af2732 100644 --- a/src/gui/painting/qdrawhelper_mips_dsp_p.h +++ b/src/gui/painting/qdrawhelper_mips_dsp_p.h @@ -192,12 +192,9 @@ const uint * QT_FASTCALL qt_fetchUntransformed_argb8565_premultiplied_mips_dsp ( const QSpanData *data, int y, int x, int length); -#endif // QT_COMPILER_SUPPORTS_MIPS_DSP - -#ifdef QT_COMPILER_SUPPORTS_MIPS_DSPR2 -extern "C" void qConvertRgb16To32_asm_mips_dspr2(quint32 *dest, const quint16 *src, int length); +#if defined(__MIPS_DSPR2__) extern "C" void qt_blend_rgb16_on_rgb16_mips_dspr2_asm(quint16 *dest, const quint16 *src, int length, uint const_alpha); @@ -206,7 +203,12 @@ void qt_blend_rgb16_on_rgb16_mips_dspr2(uchar *destPixels, int dbpl, int w, int h, int const_alpha); -#endif // QT_COMPILER_SUPPORTS_MIPS_DSPR2 +const uint *QT_FASTCALL qt_fetchUntransformedRGB16_mips_dspr2(uint *buffer, const Operator *, + const QSpanData *data, int y, int x, + int length); +#endif // defined(__MIPS_DSPR2__) + +#endif // QT_COMPILER_SUPPORTS_MIPS_DSP QT_END_NAMESPACE -- cgit v1.2.3