From e1e551dabd4efc9cb486322098a072d4e337817c Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Thu, 12 Jun 2014 19:43:56 +0400 Subject: Make sure JIT architectures lists are in sync We have two lists: in qv4global_p.h and qv4targetplatform_p.h. This commit blacklists OSes on x86 and x86_64 where JIT is not supported, improves support for FreeBSD and adds cross-references between these two files. Change-Id: Id3715a2ab717186e510a54e5a548dfa22120cd87 Reviewed-by: Erik Verbruggen --- src/qml/jit/qv4targetplatform_p.h | 4 +++- src/qml/jsruntime/qv4global_p.h | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qml/jit/qv4targetplatform_p.h b/src/qml/jit/qv4targetplatform_p.h index 95db247d0f..4b384d2fe9 100644 --- a/src/qml/jit/qv4targetplatform_p.h +++ b/src/qml/jit/qv4targetplatform_p.h @@ -68,6 +68,8 @@ namespace JIT { // calculating the list of callee saved registers in getCalleeSavedRegisters (which is used to // generate push/pop instructions in the prelude/postlude), we add ebx too. Then when synthesizing // a call, we add a load it right before emitting the call instruction. +// +// NOTE: When adding new architecture, do not forget to whitelist it in qv4global_p.h! class TargetPlatform { public: @@ -115,7 +117,7 @@ public: static void platformLeaveStandardStackFrame(JSC::MacroAssembler *as) { Q_UNUSED(as); } #if OS(WINDOWS) || OS(QNX) || \ - (OS(LINUX) && (defined(__PIC__) || defined(__PIE__))) + ((OS(LINUX) || OS(FREEBSD)) && (defined(__PIC__) || defined(__PIE__))) #define RESTORE_EBX_ON_CALL static JSC::MacroAssembler::Address ebxAddressOnStack() diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index a00231c3a1..b6172a79a5 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -74,10 +74,12 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } // Decide whether to enable or disable the JIT // White list architectures +// +// NOTE: This should match the logic in qv4targetplatform_p.h! -#if defined(Q_PROCESSOR_X86) +#if defined(Q_PROCESSOR_X86) && (defined(Q_OS_WINDOWS) || defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD)) #define V4_ENABLE_JIT -#elif defined(Q_PROCESSOR_X86_64) +#elif defined(Q_PROCESSOR_X86_64) && (defined(Q_OS_WINDOWS) || defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)) #define V4_ENABLE_JIT #elif defined(Q_PROCESSOR_ARM_32) -- cgit v1.2.3