Revision: 18924
Author:   [email protected]
Date:     Wed Jan 29 15:50:34 2014 UTC
Log: A64: Move integer exponent into correct register before calling MathPowStub.

Follow-up to r18911.

TEST=mozilla/ecma/Expressions/11.7.1
[email protected], [email protected]

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

Modified:
 /branches/experimental/a64/src/a64/lithium-a64.cc
 /branches/experimental/a64/src/a64/lithium-codegen-a64.cc

=======================================
--- /branches/experimental/a64/src/a64/lithium-a64.cc Wed Jan 29 14:32:54 2014 UTC +++ /branches/experimental/a64/src/a64/lithium-a64.cc Wed Jan 29 15:50:34 2014 UTC
@@ -1909,9 +1909,11 @@
   Representation exponent_type = instr->right()->representation();
   ASSERT(instr->left()->representation().IsDouble());
   LOperand* left = UseFixedDouble(instr->left(), d0);
-  LOperand* right = exponent_type.IsDouble() ?
-      UseFixedDouble(instr->right(), d1) :
-      UseFixed(instr->right(), x11);
+  LOperand* right = exponent_type.IsInteger32()
+                        ? UseFixed(instr->right(), x12)
+                        : exponent_type.IsDouble()
+                            ? UseFixedDouble(instr->right(), d1)
+                            : UseFixed(instr->right(), x11);
   LPower* result = new(zone()) LPower(left, right);
   return MarkAsCall(DefineFixedDouble(result, d0),
                     instr,
=======================================
--- /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Wed Jan 29 14:32:54 2014 UTC +++ /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Wed Jan 29 15:50:34 2014 UTC
@@ -3767,8 +3767,9 @@
   // Just make sure that the input/output registers are the expected ones.
   ASSERT(!instr->right()->IsDoubleRegister() ||
          ToDoubleRegister(instr->right()).is(d1));
-  ASSERT(!instr->right()->IsRegister() ||
+  ASSERT(exponent_type.IsInteger32() || !instr->right()->IsRegister() ||
          ToRegister(instr->right()).is(x11));
+ ASSERT(!exponent_type.IsInteger32() || ToRegister(instr->right()).is(x12));
   ASSERT(ToDoubleRegister(instr->left()).is(d0));
   ASSERT(ToDoubleRegister(instr->result()).is(d0));

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