Revision: 19426
Author:   [email protected]
Date:     Tue Feb 18 08:59:06 2014 UTC
Log:      A64: Update DoAllocate() to use a W register for the size

Inputs should always be 32bit

BUG=none
[email protected], [email protected]
LOG=n

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

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

=======================================
--- /branches/bleeding_edge/src/a64/lithium-codegen-a64.cc Mon Feb 17 15:09:46 2014 UTC +++ /branches/bleeding_edge/src/a64/lithium-codegen-a64.cc Tue Feb 18 08:59:06 2014 UTC
@@ -1505,8 +1505,9 @@
     int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
     __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
   } else {
-    Register size = ToRegister(instr->size());
-    __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
+    Register size = ToRegister32(instr->size());
+    __ Sxtw(size.X(), size);
+    __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags);
   }

   __ Bind(deferred->exit());
@@ -1516,7 +1517,7 @@
       int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
       __ Mov(temp1, size - kPointerSize);
     } else {
-      __ Sub(temp1, ToRegister(instr->size()), kPointerSize);
+      __ Sub(temp1.W(), ToRegister32(instr->size()), kPointerSize);
     }
     __ Sub(result, result, kHeapObjectTag);

@@ -1545,7 +1546,7 @@
   if (instr->size()->IsConstantOperand()) {
     __ Mov(size, Operand(ToSmi(LConstantOperand::cast(instr->size()))));
   } else {
-    __ SmiTag(size, ToRegister(instr->size()));
+    __ SmiTag(size, ToRegister32(instr->size()).X());
   }
   int flags = AllocateDoubleAlignFlag::encode(
       instr->hydrogen()->MustAllocateDoubleAligned());

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