Revision: 17306
Author:   [email protected]
Date:     Mon Oct 21 22:22:03 2013 UTC
Log:      MIPS: Fix kraken 1.1 benchmark failure.

This makes sure that the DoubleToIStub::Generate method
does not overwrite the value of the f12 register.

TEST=bencnhmarks/kraken/stanford-crypto-pbkdf2
BUG=
[email protected]

Review URL: https://codereview.chromium.org/33463002
http://code.google.com/p/v8/source/detail?r=17306

Modified:
 /branches/bleeding_edge/src/mips/code-stubs-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Oct 21 22:16:01 2013 UTC +++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Oct 21 22:22:03 2013 UTC
@@ -547,23 +547,27 @@
       GetRegisterThatIsNotOneOf(input_reg, result_reg, scratch);
   Register scratch3 =
       GetRegisterThatIsNotOneOf(input_reg, result_reg, scratch, scratch2);
-  DoubleRegister double_scratch = kLithiumScratchDouble.low();
-  DoubleRegister double_input = f12;
+  DoubleRegister double_scratch = kLithiumScratchDouble;

   __ Push(scratch, scratch2, scratch3);

-  __ ldc1(double_input, MemOperand(input_reg, double_offset));
+  if (!skip_fastpath()) {
+    // Load double input.
+    __ ldc1(double_scratch, MemOperand(input_reg, double_offset));

-  if (!skip_fastpath()) {
     // Clear cumulative exception flags and save the FCSR.
     __ cfc1(scratch2, FCSR);
     __ ctc1(zero_reg, FCSR);
+
     // Try a conversion to a signed integer.
-    __ trunc_w_d(double_scratch, double_input);
+    __ Trunc_w_d(double_scratch, double_scratch);
+    // Move the converted value into the result register.
     __ mfc1(result_reg, double_scratch);
+
     // Retrieve and restore the FCSR.
     __ cfc1(scratch, FCSR);
     __ ctc1(scratch2, FCSR);
+
     // Check for overflow and NaNs.
     __ And(
         scratch, scratch,
@@ -576,7 +580,9 @@
   // Load the double value and perform a manual truncation.
   Register input_high = scratch2;
   Register input_low = scratch3;
-  __ Move(input_low, input_high, double_input);
+
+  __ lw(input_low, MemOperand(input_reg, double_offset));
+  __ lw(input_high, MemOperand(input_reg, double_offset + kIntSize));

   Label normal_exponent, restore_sign;
   // Extract the biased exponent in result.

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