summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsimd_p.h
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-02-23 16:06:41 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-02-23 17:06:30 (GMT)
commit60fd302e8d88b92ade59d68872c99310128c3a6c (patch)
tree870288ddc921f1fb68178b8d17200abeb46545d9 /src/corelib/tools/qsimd_p.h
parentd7181ae996f9add10bf4e956ddbedff99cb19378 (diff)
downloadQt-60fd302e8d88b92ade59d68872c99310128c3a6c.zip
Qt-60fd302e8d88b92ade59d68872c99310128c3a6c.tar.gz
Qt-60fd302e8d88b92ade59d68872c99310128c3a6c.tar.bz2
Implement QString::fromLatin1_helper() with SSE2
When there is at least 16 characters, use SSE2 to convert from 8bits to 16 bits. Reviewed-by: Samuel Rødal Reveiwed-by: Thiago Macieira
Diffstat (limited to 'src/corelib/tools/qsimd_p.h')
-rw-r--r--src/corelib/tools/qsimd_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index d535762..d0a057e 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -60,6 +60,15 @@ QT_MODULE(Core)
#undef QT_HAVE_MMX
#endif
+
+#if defined(__x86_64__) || defined(Q_OS_WIN64) || defined(__ia64__) || defined(__SSE2__)
+#if defined(QT_HAVE_SSE2)
+// Defined for small fast functions that can take advantages of SSE2 intrinsics
+#define QT_ALWAYS_HAVE_SSE2
+#endif
+#endif
+
+
// SSE intrinsics
#if defined(QT_HAVE_SSE2) || defined(QT_HAVE_SSE) || defined(QT_HAVE_MMX)
#if defined(QT_LINUXBASE)