diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-10-16 17:18:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-17 11:36:32 +0200 |
commit | 3cbc607b74a1fc410689472d8821771377fcc786 (patch) | |
tree | 1a6343905f21b2ef4164fb1be6c91a85ec14a854 /src/qml/jsruntime/qv4global_p.h | |
parent | a443af35591224667fd681462b3446fad834a6ef (diff) |
Fix build on ARM in ARM mode (instead of thumb2)
We don't support the traditional ARM assembler (yet), only JIT on thumb2. In
order for us to reliably check that, we have to wait until the pre-processor
runs, which this patch achieves by moving all JIT enable/disable decisions into
qv4global_p.h
Change-Id: I7eff5b4fbf1cd26297a08dee16984ad867358113
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4global_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4global_p.h | 31 |
1 files changed, 31 insertions, 0 deletions
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 |