diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-01-13 16:45:54 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-02-01 08:17:10 +0000 |
commit | 6aaf6abb692dbdc0f0400ab5c76c438034957d55 (patch) | |
tree | c5b1d58ab2932bebc078bf979b682c2a43051a69 /src/qml/jit | |
parent | a159d6d43da100c5a4acb183589fa4554b33a474 (diff) |
Include the ARMv7 assembler in the qmldevtools bootstrap build
Even when the C++ target is not ARMv7 we want to include it in order to
be able to generate QML cache files with code ahead of time.
This requires a few changes:
* The Jump classes need to move from the AbstractMacroAssembler
super-class into the concrete assembler sub-class, in order to
use it in specializations.
* Some of the template specializations in LinkBuffer for example or
for platform dependent operations need to be pre-processor enabled
when bootstrapping
* The generic loadPtr/addPtr etc. functions need to move to the concrete
assemblers to be able to call the correct 32-bit or 64-bit variations.
* We need to force what looks like a loss of precision to the compiler
in the 32-bit ARMv7 linking code when linking jumps.
Finally then we can explicitly instantiate at least QV4::JIT::Assembler
for ARMv7 when bootstrapping. Currently only on x86-64 hosts, but that
is a temporary limitation.
Change-Id: I501db2360e1fded48f17f17d9e87252d47f8537e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jit')
-rw-r--r-- | src/qml/jit/qv4assembler.cpp | 3 | ||||
-rw-r--r-- | src/qml/jit/qv4binop.cpp | 3 | ||||
-rw-r--r-- | src/qml/jit/qv4targetplatform_p.h | 2 | ||||
-rw-r--r-- | src/qml/jit/qv4unop.cpp | 3 |
4 files changed, 10 insertions, 1 deletions
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp index 3ac8779508..646d9a8871 100644 --- a/src/qml/jit/qv4assembler.cpp +++ b/src/qml/jit/qv4assembler.cpp @@ -709,5 +709,8 @@ JSC::MacroAssemblerCodeRef Assembler<TargetConfiguration>::link(int *codeSize) } template class QV4::JIT::Assembler<DefaultAssemblerTargetConfiguration>; +#if defined(V4_BOOTSTRAP) && CPU(X86_64) +template class QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization>>; +#endif #endif diff --git a/src/qml/jit/qv4binop.cpp b/src/qml/jit/qv4binop.cpp index 3a349286c6..8468bf65a6 100644 --- a/src/qml/jit/qv4binop.cpp +++ b/src/qml/jit/qv4binop.cpp @@ -577,5 +577,8 @@ typename JITAssembler::Jump Binop<JITAssembler>::genInlineBinop(IR::Expr *leftSo } template struct QV4::JIT::Binop<QV4::JIT::Assembler<DefaultAssemblerTargetConfiguration>>; +#if defined(V4_BOOTSTRAP) && CPU(X86_64) +template struct QV4::JIT::Binop<QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization>>>; +#endif #endif diff --git a/src/qml/jit/qv4targetplatform_p.h b/src/qml/jit/qv4targetplatform_p.h index ca6da649c9..1c29aa2a70 100644 --- a/src/qml/jit/qv4targetplatform_p.h +++ b/src/qml/jit/qv4targetplatform_p.h @@ -310,7 +310,7 @@ public: }; #endif // Windows on x86_64 -#if CPU(ARM) +#if CPU(ARM) || defined(V4_BOOTSTRAP) template <> class TargetPlatform<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization> { diff --git a/src/qml/jit/qv4unop.cpp b/src/qml/jit/qv4unop.cpp index cc03fa6006..31355e5dce 100644 --- a/src/qml/jit/qv4unop.cpp +++ b/src/qml/jit/qv4unop.cpp @@ -145,5 +145,8 @@ void Unop<JITAssembler>::generateCompl(IR::Expr *source, IR::Expr *target) } template struct QV4::JIT::Unop<QV4::JIT::Assembler<DefaultAssemblerTargetConfiguration>>; +#if defined(V4_BOOTSTRAP) && CPU(X86_64) +template struct QV4::JIT::Unop<QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization>>>; +#endif #endif |