From: Erik Verbruggen Date: Wed, 25 Sep 2013 09:58:03 +0000 (+0200) Subject: V4 JIT: optimize constant-to-register loading. X-Git-Tag: upstream/5.2.1~351 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e62a61cdbc22dcf0dd2c6c8c22b06be897577ec0;p=platform%2Fupstream%2Fqtdeclarative.git V4 JIT: optimize constant-to-register loading. Change-Id: I02e3cdd5f9a68fbf6bfd7805c385d807b344155b Reviewed-by: Lars Knoll --- diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h index 86a4dd6..a9355bd 100644 --- a/src/qml/compiler/qv4isel_masm_p.h +++ b/src/qml/compiler/qv4isel_masm_p.h @@ -1224,9 +1224,12 @@ public: { if (V4IR::Const *c = e->asConst()) { #if QT_POINTER_SIZE == 8 - load64(constantTable().loadValueAddress(c, ScratchRegister), ReturnValueRegister); - move(TrustedImm64(QV4::Value::NaNEncodeMask), ScratchRegister); - xor64(ScratchRegister, ReturnValueRegister); + union { + double d; + int64_t i; + } u; + u.d = c->value; + move(TrustedImm64(u.i), ReturnValueRegister); move64ToDouble(ReturnValueRegister, target); #else JSC::MacroAssembler::loadDouble(constantTable().loadValueAddress(c, ScratchRegister), target);