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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
antonm@chromium.org 2010-05-07 10:56:22 +00:00
parent 856135af42
commit 5ce4f8059b
2 changed files with 3 additions and 3 deletions

View File

@ -4447,7 +4447,7 @@ void CodeGenerator::GenerateRegExpConstructResult(ZoneList<Expression*>* args) {
__ Move(FieldOperand(rcx, HeapObject::kMapOffset), __ Move(FieldOperand(rcx, HeapObject::kMapOffset),
Factory::fixed_array_map()); Factory::fixed_array_map());
// Set length. // Set length.
__ movq(FieldOperand(rcx, FixedArray::kLengthOffset), rbx); __ movl(FieldOperand(rcx, FixedArray::kLengthOffset), rbx);
// Fill contents of fixed-array with the-hole. // Fill contents of fixed-array with the-hole.
__ Move(rdx, Factory::the_hole_value()); __ Move(rdx, Factory::the_hole_value());
__ lea(rcx, FieldOperand(rcx, FixedArray::kHeaderSize)); __ lea(rcx, FieldOperand(rcx, FixedArray::kHeaderSize));
@ -9010,7 +9010,7 @@ void ArgumentsAccessStub::GenerateNewObject(MacroAssembler* masm) {
__ movq(FieldOperand(rax, JSObject::kElementsOffset), rdi); __ movq(FieldOperand(rax, JSObject::kElementsOffset), rdi);
__ LoadRoot(kScratchRegister, Heap::kFixedArrayMapRootIndex); __ LoadRoot(kScratchRegister, Heap::kFixedArrayMapRootIndex);
__ movq(FieldOperand(rdi, FixedArray::kMapOffset), kScratchRegister); __ movq(FieldOperand(rdi, FixedArray::kMapOffset), kScratchRegister);
__ movq(FieldOperand(rdi, FixedArray::kLengthOffset), rcx); __ movl(FieldOperand(rdi, FixedArray::kLengthOffset), rcx);
// Copy the fixed array slots. // Copy the fixed array slots.
Label loop; Label loop;

View File

@ -1194,7 +1194,7 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
__ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
// Increment element's and array's sizes. // Increment element's and array's sizes.
__ addq(FieldOperand(rbx, FixedArray::kLengthOffset), __ addl(FieldOperand(rbx, FixedArray::kLengthOffset),
Immediate(kAllocationDelta)); Immediate(kAllocationDelta));
__ movq(FieldOperand(rdx, JSArray::kLengthOffset), rax); __ movq(FieldOperand(rdx, JSArray::kLengthOffset), rax);