Revision: 24536
Author:   [email protected]
Date:     Fri Oct 10 18:00:58 2014 UTC
Log:      MIPS: Fix loading Float64 constants in turbofan.

TEST=ctest/test-run-machops/RunFloat64SubImm1,
     RunFloat64SubImm2, RunFloat64MulImm, RunFloat64Compare

BUG=
[email protected]

Review URL: https://codereview.chromium.org/646923003
https://code.google.com/p/v8/source/detail?r=24536

Modified:
 /branches/bleeding_edge/src/mips/macro-assembler-mips.cc
 /branches/bleeding_edge/src/mips/macro-assembler-mips.h

=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Thu Sep 25 07:16:15 2014 UTC +++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Fri Oct 10 18:00:58 2014 UTC
@@ -23,7 +23,8 @@
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
     : Assembler(arg_isolate, buffer, size),
       generating_stub_(false),
-      has_frame_(false) {
+      has_frame_(false),
+      has_double_zero_reg_set_(false) {
   if (isolate() != NULL) {
     code_object_ = Handle<Object>(isolate()->heap()->undefined_value(),
                                   isolate());
@@ -1530,10 +1531,9 @@
   static const DoubleRepresentation zero(0.0);
   DoubleRepresentation value_rep(imm);
   // Handle special values first.
-  bool force_load = dst.is(kDoubleRegZero);
-  if (value_rep == zero && !force_load) {
+  if (value_rep == zero && has_double_zero_reg_set_) {
     mov_d(dst, kDoubleRegZero);
-  } else if (value_rep == minus_zero && !force_load) {
+  } else if (value_rep == minus_zero && has_double_zero_reg_set_) {
     neg_d(dst, kDoubleRegZero);
   } else {
     uint32_t lo, hi;
@@ -1554,6 +1554,7 @@
     } else {
       Mthc1(zero_reg, dst);
     }
+    if (dst.is(kDoubleRegZero)) has_double_zero_reg_set_ = true;
   }
 }

=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.h Wed Sep 24 21:16:36 2014 UTC +++ /branches/bleeding_edge/src/mips/macro-assembler-mips.h Fri Oct 10 18:00:58 2014 UTC
@@ -1665,6 +1665,7 @@

   bool generating_stub_;
   bool has_frame_;
+  bool has_double_zero_reg_set_;
   // This handle will be patched with the code object on installation.
   Handle<Object> code_object_;

--
--
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