aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-11-08 15:27:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-09 18:14:33 +0100
commit4662e632e4f92b335483b91cd1f3576d6d82146f (patch)
tree7385d30e43527c78fbda070f14f3536f17f89698 /src/qml/qml/v8
parenta015f42322e95ce27f37de925650e86c1c899e55 (diff)
For x86 builds, try to detect SSE2 availability early and bail out
...instead of potentially just crashing. This is for the rare case of somebody trying to run a QML2 based application on a Pentium 3 from before 2001 or older. Change-Id: Ia5606fe28ef5579654ec939c86830af70dbb84d7 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/v8')
-rw-r--r--src/qml/qml/v8/qv8engine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 14fd74701f..d0fc1b1295 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -66,6 +66,7 @@
#include <QtCore/qjsonobject.h>
#include <QtCore/qjsonvalue.h>
#include <QtCore/qdatetime.h>
+#include <private/qsimd_p.h>
#include <private/qv4value_p.h>
#include <private/qv4dateobject_p.h>
@@ -93,6 +94,12 @@ QV8Engine::QV8Engine(QJSEngine* qq)
, m_xmlHttpRequestData(0)
, m_listModelData(0)
{
+#ifdef Q_PROCESSOR_X86_32
+ if (!(qCpuFeatures() & SSE2)) {
+ qFatal("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer");
+ }
+#endif
+
QML_MEMORY_SCOPE_STRING("QV8Engine::QV8Engine");
qMetaTypeId<QJSValue>();
qMetaTypeId<QList<int> >();