From 416c112aea592e41a66d65a21a885f31d9a566d0 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Fri, 18 Jan 2013 19:36:54 +0200 Subject: MIPS: Support recognition of the DSP ASE at run-time Add detection of MIPS DSPr2 at run-time in qsimd.cpp. This makes it possible to have generic Qt builds for MIPS that can enable the fast code paths for processors with the DSP ASE at run-time. Also, this makes it possible to manually disable them by setting the environment variable "QT_NO_CPU_FEATURE=dspr2". Last, but not least, functions requiring DSPr2 are not enabled when running in CPUs with version-1 DSP. Change-Id: Ia5a01d84119553c22ab83386c74a6cb8ba5fee53 Reviewed-by: Thiago Macieira --- src/gui/image/qjpeghandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/image/qjpeghandler.cpp') diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp index dfacf34097..c1d3ff9a85 100644 --- a/src/gui/image/qjpeghandler.cpp +++ b/src/gui/image/qjpeghandler.cpp @@ -876,7 +876,9 @@ QJpegHandler::QJpegHandler() } #endif // QT_COMPILER_SUPPORTS_SSSE3 #if defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2) - rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_mips_dspr2_asm; + if (qCpuHasFeature(DSPR2)) { + rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_mips_dspr2_asm; + } #endif // QT_COMPILER_SUPPORTS_DSPR2 } -- cgit v1.2.3