iOS: Enable non-pixman NEON drawhelpers for both 32 and 64-bit

The pixman drawhelpers are implemented using GAS syntax, which the
Clang assembler doesn't handle, nor do they work on 64-bit ARM, so
we disable them selectively. They are only used for 16-bit surfaces
anyways, so it not a big deal on iOS.

(cherry picked from commit 49568df954)
Change-Id: I70848981c794739d40a6a2d9a537307bc80d61a6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
bb10
Tor Arne Vestbø 2015-12-09 15:28:05 +01:00 committed by Jani Heikkinen
parent a094af0017
commit d729c3459f
4 changed files with 17 additions and 11 deletions

View File

@ -34,6 +34,8 @@
* - pixman_composite_over_n_8_0565_asm_neon
*/
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
/* Prevent the stack from becoming executable for no reason... */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
@ -1707,3 +1709,5 @@ generate_composite_function \
0, /* dst_r_basereg */ \
0, /* src_basereg */ \
0 /* mask_basereg */
#endif

View File

@ -101,12 +101,10 @@ SSE4_1_SOURCES += painting/qdrawhelper_sse4.cpp \
painting/qimagescale_sse4.cpp
AVX2_SOURCES += painting/qdrawhelper_avx2.cpp
!ios {
CONFIG += no_clang_integrated_as
NEON_SOURCES += painting/qdrawhelper_neon.cpp
NEON_HEADERS += painting/qdrawhelper_neon_p.h
!contains(QT_ARCH, "arm64"): NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S
}
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:!contains(QT_ARCH, "arm64"): DEFINES += ENABLE_PIXMAN_DRAWHELPERS
MIPS_DSP_SOURCES += painting/qdrawhelper_mips_dsp.cpp
MIPS_DSP_HEADERS += painting/qdrawhelper_mips_dsp_p.h painting/qt_mips_asm_dsp_p.h

View File

@ -135,7 +135,7 @@ static inline uint16x8_t qvsource_over_u16(uint16x8_t src16, uint16x8_t dst16, u
return vaddq_u16(src16, qvbyte_mul_u16(dst16, alpha16, half));
}
#if !defined(Q_PROCESSOR_ARM_64)
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
extern "C" void
pixman_composite_over_8888_0565_asm_neon (int32_t w,
int32_t h,
@ -352,7 +352,7 @@ void qt_blend_argb32_on_rgb16_neon(uchar *destPixels, int dbpl,
void qt_blend_argb32_on_argb32_scanline_neon(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255) {
#if !defined(Q_PROCESSOR_ARM_64)
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
pixman_composite_scanline_over_asm_neon(length, dest, src);
#else
qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, 256);
@ -372,7 +372,7 @@ void qt_blend_argb32_on_argb32_neon(uchar *destPixels, int dbpl,
uint16x8_t half = vdupq_n_u16(0x80);
uint16x8_t full = vdupq_n_u16(0xff);
if (const_alpha == 256) {
#if !defined(Q_PROCESSOR_ARM_64)
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
pixman_composite_over_8888_8888_asm_neon(w, h, (uint32_t *)destPixels, dbpl / 4, (uint32_t *)srcPixels, sbpl / 4);
#else
for (int y=0; y<h; ++y) {
@ -530,7 +530,7 @@ void qt_blend_rgb32_on_rgb32_neon(uchar *destPixels, int dbpl,
}
}
#if !defined(Q_PROCESSOR_ARM_64)
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
void qt_alphamapblit_quint16_neon(QRasterBuffer *rasterBuffer,
int x, int y, const QRgba64 &color,
const uchar *bitmap,
@ -868,7 +868,7 @@ void QT_FASTCALL comp_func_Plus_neon(uint *dst, const uint *src, int length, uin
}
}
#if !defined(Q_PROCESSOR_ARM_64)
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
static const int tileSize = 32;
extern "C" void qt_rotate90_16_neon(quint16 *dst, const quint16 *src, int sstride, int dstride, int count);

View File

@ -31,6 +31,8 @@
**
****************************************************************************/
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
/* Prevent the stack from becoming executable for no reason... */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
@ -287,3 +289,5 @@ qt_rotate90_16_neon:
pop { r4-r11, pc }
.endfunc
#endif