aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_masm_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-09-24 11:42:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 23:56:53 +0200
commite4c696dda3610a7c6e34bf705656d90babc9d461 (patch)
tree09617040cba956f8ec3874ec64762fa08dbe856d /src/qml/compiler/qv4isel_masm_p.h
parent342831427beb0f3a48061453df89624ba2d7c886 (diff)
V4 JIT: optimize mem2mem copies.
Instead of loading and decoding a value and then encoding and storing it, we can just as well fold that into a load+store. Change-Id: I84c8eb310510a91cefe2cbc0d4bb01856b41663d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_masm_p.h')
-rw-r--r--src/qml/compiler/qv4isel_masm_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h
index a4550c63ed..86a4dd6304 100644
--- a/src/qml/compiler/qv4isel_masm_p.h
+++ b/src/qml/compiler/qv4isel_masm_p.h
@@ -808,6 +808,15 @@ public:
template <typename Result>
void copyValue(Result result, V4IR::Expr* source);
+ // The scratch register is used to calculate the temp address for the source.
+ void memcopyValue(Pointer target, V4IR::Temp *sourceTemp, RegisterID scratchRegister)
+ {
+ Q_ASSERT(sourceTemp->kind != V4IR::Temp::PhysicalRegister);
+ Q_ASSERT(target.base != scratchRegister);
+ JSC::MacroAssembler::loadDouble(loadTempAddress(scratchRegister, sourceTemp), FPGpr0);
+ JSC::MacroAssembler::storeDouble(FPGpr0, target);
+ }
+
void storeValue(QV4::Value value, RegisterID destination)
{
Q_UNUSED(value);