Revision: 23710
Author:   [email protected]
Date:     Fri Sep  5 05:22:41 2014 UTC
Log:      X87: enable snapshot

Tweak LConstantD and LStoreKeyed to avoid fp register spilling

BUG=
[email protected]

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

Patch from Jing Bao <[email protected]>.
https://code.google.com/p/v8/source/detail?r=23710

Modified:
 /branches/bleeding_edge/src/x87/lithium-x87.cc
 /branches/bleeding_edge/src/x87/lithium-x87.h

=======================================
--- /branches/bleeding_edge/src/x87/lithium-x87.cc Fri Sep 5 02:11:31 2014 UTC +++ /branches/bleeding_edge/src/x87/lithium-x87.cc Fri Sep 5 05:22:41 2014 UTC
@@ -2054,10 +2054,7 @@
   } else if (r.IsInteger32()) {
     return DefineAsRegister(new(zone()) LConstantI);
   } else if (r.IsDouble()) {
-    double value = instr->DoubleValue();
-    bool value_is_zero = BitCast<uint64_t, double>(value) == 0;
-    LOperand* temp = value_is_zero ? NULL : TempRegister();
-    return DefineAsRegister(new(zone()) LConstantD(temp));
+    return DefineAsRegister(new (zone()) LConstantD);
   } else if (r.IsExternal()) {
     return DefineAsRegister(new(zone()) LConstantE);
   } else if (r.IsTagged()) {
@@ -2248,8 +2245,10 @@

     if (instr->value()->representation().IsDouble()) {
       LOperand* object = UseRegisterAtStart(instr->elements());
-      LOperand* val = NULL;
-      val = UseRegisterAtStart(instr->value());
+      // For storing double hole, no fp register required.
+      LOperand* val = instr->IsConstantHoleStore()
+                          ? NULL
+                          : UseRegisterAtStart(instr->value());
       LOperand* key = UseRegisterOrConstantAtStart(instr->key());
       return new(zone()) LStoreKeyed(object, key, val);
     } else {
=======================================
--- /branches/bleeding_edge/src/x87/lithium-x87.h Fri Sep 5 02:11:31 2014 UTC +++ /branches/bleeding_edge/src/x87/lithium-x87.h Fri Sep 5 05:22:41 2014 UTC
@@ -1336,12 +1336,6 @@

 class LConstantD FINAL : public LTemplateInstruction<1, 0, 1> {
  public:
-  explicit LConstantD(LOperand* temp) {
-    temps_[0] = temp;
-  }
-
-  LOperand* temp() { return temps_[0]; }
-
   DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
   DECLARE_HYDROGEN_ACCESSOR(Constant)

--
--
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/d/optout.

Reply via email to