Revision: 15646
Author:   [email protected]
Date:     Fri Jul 12 05:34:11 2013
Log: Fix LGapResolver::EmitMove for X64 when the dst is a double register and src is a constant

[email protected]

Review URL: https://codereview.chromium.org/18301015

Patch from Haitao Feng <[email protected]>.
http://code.google.com/p/v8/source/detail?r=15646

Modified:
 /branches/bleeding_edge/src/x64/lithium-gap-resolver-x64.cc

=======================================
--- /branches/bleeding_edge/src/x64/lithium-gap-resolver-x64.cc Fri Jul 5 03:34:02 2013 +++ /branches/bleeding_edge/src/x64/lithium-gap-resolver-x64.cc Fri Jul 12 05:34:11 2013
@@ -205,16 +205,12 @@
     } else if (destination->IsDoubleRegister()) {
       double v = cgen_->ToDouble(constant_source);
       uint64_t int_val = BitCast<uint64_t, double>(v);
-      int32_t lower = static_cast<int32_t>(int_val);
-      int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt));
       XMMRegister dst = cgen_->ToDoubleRegister(destination);
       if (int_val == 0) {
         __ xorps(dst, dst);
       } else {
-        __ push(Immediate(upper));
-        __ push(Immediate(lower));
-        __ movsd(dst, Operand(rsp, 0));
-        __ addq(rsp, Immediate(kDoubleSize));
+        __ movq(kScratchRegister, int_val, RelocInfo::NONE64);
+        __ movq(dst, kScratchRegister);
       }
     } else {
       ASSERT(destination->IsStackSlot());

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to