aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit/qv4isel_masm.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-08-12 14:30:42 +0200
committerErik Verbruggen <erik.verbruggen@digia.com>2014-08-14 15:27:55 +0200
commita503efe0df31742bac7d5af6ed4a53ee79a4c2a7 (patch)
tree3b3e67c5e4249354daf033932f855245fe07ce1a /src/qml/jit/qv4isel_masm.cpp
parentd9f33ccdef985badc56fd8940373748626beffc7 (diff)
V4 JIT: calculate used registers and only save those.
Instead of saving all possibly used ones. Note that floating point registers are not saved yet, as we don't support callee-saved FP registers yet. Change-Id: I1db2ba2513f7b466c64ec103eda0c464269247b0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jit/qv4isel_masm.cpp')
-rw-r--r--src/qml/jit/qv4isel_masm.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 5547190303..39e7c0fbc2 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -225,8 +225,9 @@ void InstructionSelection::run(int functionIndex)
static const bool withRegisterAllocator = qgetenv("QV4_NO_REGALLOC").isEmpty();
if (Assembler::RegAllocIsSupported && opt.isInSSA() && withRegisterAllocator) {
- RegisterAllocator(Assembler::getRegisterInfo()).run(_function, opt);
- calculateRegistersToSave(Assembler::getRegisterInfo());
+ RegisterAllocator regalloc(Assembler::getRegisterInfo());
+ regalloc.run(_function, opt);
+ calculateRegistersToSave(regalloc.usedRegisters());
} else {
if (opt.isInSSA())
// No register allocator available for this platform, or env. var was set, so: