The fast and the furious, register drift.
authorErik Verbruggen <erik.verbruggen@digia.com>
Fri, 23 Aug 2013 12:40:33 +0000 (14:40 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 27 Aug 2013 11:55:24 +0000 (13:55 +0200)
commit7313a37119f9d6e7389a61bf377f16473a44b0a7
treedd8cdddf743e27f291106228664788f818188a74
parentfc9199e4dbce55b011f66c36391e6c6aa08bd318
The fast and the furious, register drift.

Enable the register allocator for X86_64 on Linux and MacOS. The
implications are:
- handle as much as possible with current code with as few changes as
possible
- temporarily force the register allocator to spill unop/binop arguments
to the stack by doing a call in the implementation (as is the current
case), so no change is needed here
- only have loadThis and loadConst handle registers
- have any method that might need to handle registrers actually cope
with them
- the inline versions of binops are not generated, as they cannot cope
with registers. This will change when ISel for binops is added in the
next patch.

This means that we are still running with the handbrakes on, but allow
for full-throttle in certain/limited cases.

Note about the changed test: multiplication always returns a Number
(double), so the operands are passed as doubles, so __qmljs_mul will
return a double. For addition this is different: because it might return
a Number or a String, the operands are passed as whatever fits best. So
__qmljs_add will return an int when both operands are ints. Hence the
change to the tests.

Change-Id: If5bd7dffca8f7de5ba45af700b9c7bb568fc74b7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
12 files changed:
src/qml/compiler/qv4isel_masm.cpp
src/qml/compiler/qv4isel_masm_p.h
src/qml/compiler/qv4isel_moth.cpp
src/qml/compiler/qv4isel_moth_p.h
src/qml/compiler/qv4isel_p.cpp
src/qml/compiler/qv4isel_p.h
src/qml/compiler/qv4jsir.cpp
src/qml/compiler/qv4regalloc.cpp
src/qml/compiler/qv4ssa.cpp
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4runtime_p.h
tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp