diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/compiler.pri | 11 | ||||
-rw-r--r-- | src/qml/compiler/qv4isel_masm.cpp | 4 | ||||
-rw-r--r-- | src/qml/compiler/qv4isel_masm_p.h | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4global_p.h | 31 |
4 files changed, 44 insertions, 7 deletions
diff --git a/src/qml/compiler/compiler.pri b/src/qml/compiler/compiler.pri index 3a1af30b88..df4f5e8dc3 100644 --- a/src/qml/compiler/compiler.pri +++ b/src/qml/compiler/compiler.pri @@ -14,7 +14,8 @@ HEADERS += \ $$PWD/qv4isel_util_p.h \ $$PWD/qv4ssa_p.h \ $$PWD/qv4regalloc_p.h \ - $$PWD/qqmlcodegenerator_p.h + $$PWD/qqmlcodegenerator_p.h \ + $$PWD/qv4isel_masm_p.h SOURCES += \ $$PWD/qv4compileddata.cpp \ @@ -26,11 +27,7 @@ SOURCES += \ $$PWD/qv4jsir.cpp \ $$PWD/qv4ssa.cpp \ $$PWD/qv4regalloc.cpp \ - $$PWD/qqmlcodegenerator.cpp - -contains(DEFINES, V4_ENABLE_JIT) { - HEADERS += $$PWD/qv4isel_masm_p.h - SOURCES += $$PWD/qv4isel_masm.cpp -} + $$PWD/qqmlcodegenerator.cpp \ + $$PWD/qv4isel_masm.cpp include(../../3rdparty/masm/masm.pri) diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp index 1155322df2..888d11a6c5 100644 --- a/src/qml/compiler/qv4isel_masm.cpp +++ b/src/qml/compiler/qv4isel_masm.cpp @@ -56,6 +56,8 @@ #include <iostream> #include <cassert> +#if ENABLE(ASSEMBLER) + #if USE(UDIS86) # include <udis86.h> #endif @@ -2566,3 +2568,5 @@ bool InstructionSelection::int32Binop(V4IR::AluOp oper, V4IR::Expr *leftSource, return false; } } + +#endif // ENABLE(ASSEMBLER) diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h index 02ddd158a9..bd4c564ab9 100644 --- a/src/qml/compiler/qv4isel_masm_p.h +++ b/src/qml/compiler/qv4isel_masm_p.h @@ -51,6 +51,9 @@ #include <QtCore/QHash> #include <config.h> #include <wtf/Vector.h> + +#if ENABLE(ASSEMBLER) + #include <assembler/MacroAssembler.h> #include <assembler/MacroAssemblerCodeRef.h> @@ -1606,4 +1609,6 @@ public: QT_END_NAMESPACE +#endif // ENABLE(ASSEMBLER) + #endif // QV4ISEL_MASM_P_H diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index 3569247459..2050ccd746 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -64,6 +64,37 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } #define qOffsetOf(s, m) ((size_t)((((char *)&(((s *)64)->m)) - 64))) +// Decide whether to enable or disable the JIT + +// White list architectures + +#if defined(Q_PROCESSOR_X86) +#define V4_ENABLE_JIT +#elif defined(Q_PROCESSOR_X86_64) +#define V4_ENABLE_JIT +#elif defined(Q_PROCESSOR_ARM_32) && __TARGET_ARCH_THUMB-0 == 4 +#define V4_ENABLE_JIT +#endif + +// Black list some platforms +#if defined(V4_ENABLE_JIT) +#if defined(Q_OS_WINCE) || defined(Q_OS_IOS) || defined(Q_OS_WIN64) + #undef V4_ENABLE_JIT +#endif +#endif + +// Do certain things depending on whether the JIT is enabled or disabled + +#ifdef V4_ENABLE_JIT +#define ENABLE_YARR_JIT 1 +#define ENABLE_JIT 1 +#define ENABLE_ASSEMBLER 1 +#else +#define ENABLE_YARR_JIT 0 +#define ENABLE_ASSEMBLER 0 +#define ENABLE_JIT 0 +#endif + #if defined(Q_OS_QNX) #include <math.h> #undef isnan |