Detect NEON on AArch64
The __ARM_NEON is the standard define for NEON instructions support __ARM_NEON__ is only legacy, and specifically not defined in AArch64 builds, which causes us not to detect NEON support there. The NEON assembler files doesn't build with AArch64, so the NEON drawhelper methods must be excluded for now. Change-Id: Ie32f855bde94ee7efd8a8ddb7766c931778e729b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
5c446031c3
commit
07fdfa5598
@ -237,7 +237,7 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
|
||||
#endif
|
||||
|
||||
// -- ARM --
|
||||
#ifdef __ARM_NEON__
|
||||
#if defined(__ARM_NEON) || defined(__ARM_NEON__)
|
||||
" neon"
|
||||
#endif
|
||||
#ifdef __IWMMXT__
|
||||
|
@ -250,9 +250,13 @@
|
||||
|
||||
// NEON intrinsics
|
||||
// note: as of GCC 4.9, does not support function targets for ARM
|
||||
#if defined __ARM_NEON__
|
||||
#if defined(__ARM_NEON) || defined(__ARM_NEON__)
|
||||
#include <arm_neon.h>
|
||||
#define QT_FUNCTION_TARGET_STRING_ARM_NEON "neon"
|
||||
#ifndef __ARM_NEON__
|
||||
// __ARM_NEON__ is not defined on AArch64, but we need it in our NEON detection.
|
||||
#define __ARM_NEON__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef QT_COMPILER_SUPPORTS_SIMD_ALWAYS
|
||||
|
@ -101,7 +101,7 @@ SSE4_1_SOURCES += painting/qdrawhelper_sse4.cpp \
|
||||
painting/qimagescale_sse4.cpp
|
||||
AVX2_SOURCES += painting/qdrawhelper_avx2.cpp
|
||||
|
||||
!ios {
|
||||
!ios:!contains(QT_ARCH, "arm64") {
|
||||
CONFIG += no_clang_integrated_as
|
||||
NEON_SOURCES += painting/qdrawhelper_neon.cpp
|
||||
NEON_HEADERS += painting/qdrawhelper_neon_p.h
|
||||
|
@ -6309,7 +6309,7 @@ void qt_memfill16(quint16 *dest, quint16 color, int count)
|
||||
qt_memfill_template<quint16>(dest, color, count);
|
||||
}
|
||||
#endif
|
||||
#if !defined(__SSE2__) && !defined(__ARM_NEON__)
|
||||
#if !defined(__SSE2__) && (!defined(__ARM_NEON__) || defined(Q_PROCESSOR_ARM_64))
|
||||
# ifdef QT_COMPILER_SUPPORTS_MIPS_DSP
|
||||
extern "C" void qt_memfill32_asm_mips_dsp(quint32 *, quint32, int);
|
||||
# endif
|
||||
@ -6425,7 +6425,7 @@ void qInitDrawhelperAsm()
|
||||
|
||||
#endif // SSE2
|
||||
|
||||
#if defined(__ARM_NEON__) && !defined(Q_OS_IOS)
|
||||
#if defined(__ARM_NEON__) && !defined(Q_OS_IOS) && !defined(Q_PROCESSOR_ARM_64)
|
||||
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;
|
||||
qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
|
||||
|
@ -31,15 +31,13 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <private/qdrawhelper_p.h>
|
||||
#include <private/qdrawhelper_neon_p.h>
|
||||
#include <private/qblendfunctions_p.h>
|
||||
#include <private/qmath_p.h>
|
||||
|
||||
#ifdef __ARM_NEON__
|
||||
|
||||
#include <private/qdrawhelper_neon_p.h>
|
||||
#include <private/qpaintengine_raster_p.h>
|
||||
#include <arm_neon.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user