Revision: 4610
Author: [email protected]
Date: Fri May  7 03:56:22 2010
Log: Turn {mov,add}q into {mov,add}l.

All the cases fixed are safe as registers hold 32-bit value, but that looks
safer to operate on proper sizes.

Review URL: http://codereview.chromium.org/2017002
http://code.google.com/p/v8/source/detail?r=4610

Modified:
 /branches/bleeding_edge/src/x64/codegen-x64.cc
 /branches/bleeding_edge/src/x64/stub-cache-x64.cc

=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.cc      Fri May  7 03:25:11 2010
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc      Fri May  7 03:56:22 2010
@@ -4447,7 +4447,7 @@
     __ Move(FieldOperand(rcx, HeapObject::kMapOffset),
             Factory::fixed_array_map());
     // Set length.
-    __ movq(FieldOperand(rcx, FixedArray::kLengthOffset), rbx);
+    __ movl(FieldOperand(rcx, FixedArray::kLengthOffset), rbx);
     // Fill contents of fixed-array with the-hole.
     __ Move(rdx, Factory::the_hole_value());
     __ lea(rcx, FieldOperand(rcx, FixedArray::kHeaderSize));
@@ -9010,7 +9010,7 @@
   __ movq(FieldOperand(rax, JSObject::kElementsOffset), rdi);
   __ LoadRoot(kScratchRegister, Heap::kFixedArrayMapRootIndex);
   __ movq(FieldOperand(rdi, FixedArray::kMapOffset), kScratchRegister);
-  __ movq(FieldOperand(rdi, FixedArray::kLengthOffset), rcx);
+  __ movl(FieldOperand(rdi, FixedArray::kLengthOffset), rcx);

   // Copy the fixed array slots.
   Label loop;
=======================================
--- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Thu May 6 06:21:53 2010 +++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Fri May 7 03:56:22 2010
@@ -1194,7 +1194,7 @@
       __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));

       // Increment element's and array's sizes.
-      __ addq(FieldOperand(rbx, FixedArray::kLengthOffset),
+      __ addl(FieldOperand(rbx, FixedArray::kLengthOffset),
               Immediate(kAllocationDelta));
       __ movq(FieldOperand(rdx, JSArray::kLengthOffset), rax);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to