diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-11-05 19:12:21 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-12-12 03:44:28 +0000 |
commit | 3df79b2953aa9142d66bd57676c6308acde98b47 (patch) | |
tree | 98aadd8455229e9ff25e8e8437187b7cbbe003d5 /src/gui/painting/qdrawhelper.cpp | |
parent | 33177b0456f50a1f3eae7a37b4ecc897aaf7125e (diff) |
Add an SSSE3 implementation of qt_memfill24
Brought to you by the PSHUFB instruction, introduced in SSSE3
(implementation also uses PALIGNR just because we can).
The tail functionality makes use of the fact that the low half of
"mval2" ends in the correct content, so we overwrite up to 8 bytes close
to the end.
Change-Id: Iba4b5c183776497d8ee1fffd15646a620829c335
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 95d14a4500..9ef210cc68 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -6268,8 +6268,17 @@ void qt_memfill64(quint64 *dest, quint64 color, qsizetype count) } #endif +#if defined(QT_COMPILER_SUPPORTS_SSSE3) && defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) +__attribute__((optimize("no-tree-vectorize"))) +#endif void qt_memfill24(quint24 *dest, quint24 color, qsizetype count) { +# ifdef QT_COMPILER_SUPPORTS_SSSE3 + extern void qt_memfill24_ssse3(quint24 *, quint24, qsizetype); + if (qCpuHasFeature(SSSE3)) + return qt_memfill24_ssse3(dest, color, count); +# endif + const quint32 v = color; quint24 *end = dest + count; |