From 182d6292ce6617d56a5e055af88096f5fa4d8b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 31 Mar 2013 23:31:44 +0200 Subject: [PATCH] iOS: Enable NEON optimizations, except for the pixman draw-helpers We used to disable NEON completely, as the iOS toolchain does not handle the GAS syntax of the pixman draw-helpers. But we can limit the disabling to just the draw-helpers, which means we get NEON optimization of eg. QImage and QString. Change-Id: If350b06ce521cca8b24468be5a168ff21e9e7124 Reviewed-by: Richard Moe Gustavsen --- configure | 3 +-- src/gui/painting/painting.pri | 9 ++++++--- src/gui/painting/qdrawhelper.cpp | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure b/configure index e7c478f536..e57cb29abf 100755 --- a/configure +++ b/configure @@ -4291,8 +4291,7 @@ fi # detect neon support if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then - # The iOS toolchain has trouble building the pixman NEON draw-helpers - if [ "$XPLATFORM_IOS" != "yes" ] && compileTest unix/neon "neon"; then + if compileTest unix/neon "neon"; then CFG_NEON=yes else CFG_NEON=no diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 47ba27d72a..aadcc0f686 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -91,9 +91,12 @@ SSE2_SOURCES += painting/qdrawhelper_sse2.cpp SSSE3_SOURCES += painting/qdrawhelper_ssse3.cpp IWMMXT_SOURCES += painting/qdrawhelper_iwmmxt.cpp AVX_SOURCES += painting/qdrawhelper_avx.cpp -NEON_SOURCES += painting/qdrawhelper_neon.cpp -NEON_HEADERS += painting/qdrawhelper_neon_p.h -NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S + +!ios { + NEON_SOURCES += painting/qdrawhelper_neon.cpp + NEON_HEADERS += painting/qdrawhelper_neon_p.h + NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S +} MIPS_DSP_SOURCES += painting/qdrawhelper_mips_dsp.cpp MIPS_DSP_HEADERS += painting/qdrawhelper_mips_dsp_p.h painting/qt_mips_asm_dsp_p.h diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 906ef128fa..8532a040a4 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -6157,7 +6157,7 @@ void qInitDrawhelperAsm() } #endif // IWMMXT -#if defined(QT_COMPILER_SUPPORTS_NEON) +#if defined(QT_COMPILER_SUPPORTS_NEON) && !defined(Q_OS_IOS) 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;