Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: src/x64/codegen-x64.cc

Issue 2017002: Turn {mov,add}q into {mov,add}l. (Closed)
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4374 matching lines...) Expand 10 before | Expand all | Expand 10 after
4385 4385
4386 // Fill out the elements FixedArray. 4386 // Fill out the elements FixedArray.
4387 // rax: JSArray. 4387 // rax: JSArray.
4388 // rcx: FixedArray. 4388 // rcx: FixedArray.
4389 // rbx: Number of elements in array as int32. 4389 // rbx: Number of elements in array as int32.
4390 4390
4391 // Set map. 4391 // Set map.
4392 __ Move(FieldOperand(rcx, HeapObject::kMapOffset), 4392 __ Move(FieldOperand(rcx, HeapObject::kMapOffset),
4393 Factory::fixed_array_map()); 4393 Factory::fixed_array_map());
4394 // Set length. 4394 // Set length.
4395 __ movq(FieldOperand(rcx, FixedArray::kLengthOffset), rbx); 4395 __ movl(FieldOperand(rcx, FixedArray::kLengthOffset), rbx);
4396 // Fill contents of fixed-array with the-hole. 4396 // Fill contents of fixed-array with the-hole.
4397 __ Move(rdx, Factory::the_hole_value()); 4397 __ Move(rdx, Factory::the_hole_value());
4398 __ lea(rcx, FieldOperand(rcx, FixedArray::kHeaderSize)); 4398 __ lea(rcx, FieldOperand(rcx, FixedArray::kHeaderSize));
4399 // Fill fixed array elements with hole. 4399 // Fill fixed array elements with hole.
4400 // rax: JSArray. 4400 // rax: JSArray.
4401 // rbx: Number of elements in array that remains to be filled, as int32. 4401 // rbx: Number of elements in array that remains to be filled, as int32.
4402 // rcx: Start of elements in FixedArray. 4402 // rcx: Start of elements in FixedArray.
4403 // rdx: the hole. 4403 // rdx: the hole.
4404 Label loop; 4404 Label loop;
4405 __ testl(rbx, rbx); 4405 __ testl(rbx, rbx);
(...skipping 4541 matching lines...) Expand 10 before | Expand all | Expand 10 after
8947 // Get the parameters pointer from the stack and untag the length. 8947 // Get the parameters pointer from the stack and untag the length.
8948 __ movq(rdx, Operand(rsp, 2 * kPointerSize)); 8948 __ movq(rdx, Operand(rsp, 2 * kPointerSize));
8949 __ SmiToInteger32(rcx, rcx); 8949 __ SmiToInteger32(rcx, rcx);
8950 8950
8951 // Setup the elements pointer in the allocated arguments object and 8951 // Setup the elements pointer in the allocated arguments object and
8952 // initialize the header in the elements fixed array. 8952 // initialize the header in the elements fixed array.
8953 __ lea(rdi, Operand(rax, Heap::kArgumentsObjectSize)); 8953 __ lea(rdi, Operand(rax, Heap::kArgumentsObjectSize));
8954 __ movq(FieldOperand(rax, JSObject::kElementsOffset), rdi); 8954 __ movq(FieldOperand(rax, JSObject::kElementsOffset), rdi);
8955 __ LoadRoot(kScratchRegister, Heap::kFixedArrayMapRootIndex); 8955 __ LoadRoot(kScratchRegister, Heap::kFixedArrayMapRootIndex);
8956 __ movq(FieldOperand(rdi, FixedArray::kMapOffset), kScratchRegister); 8956 __ movq(FieldOperand(rdi, FixedArray::kMapOffset), kScratchRegister);
8957 __ movq(FieldOperand(rdi, FixedArray::kLengthOffset), rcx); 8957 __ movl(FieldOperand(rdi, FixedArray::kLengthOffset), rcx);
8958 8958
8959 // Copy the fixed array slots. 8959 // Copy the fixed array slots.
8960 Label loop; 8960 Label loop;
8961 __ bind(&loop); 8961 __ bind(&loop);
8962 __ movq(kScratchRegister, Operand(rdx, -1 * kPointerSize)); // Skip receiver. 8962 __ movq(kScratchRegister, Operand(rdx, -1 * kPointerSize)); // Skip receiver.
8963 __ movq(FieldOperand(rdi, FixedArray::kHeaderSize), kScratchRegister); 8963 __ movq(FieldOperand(rdi, FixedArray::kHeaderSize), kScratchRegister);
8964 __ addq(rdi, Immediate(kPointerSize)); 8964 __ addq(rdi, Immediate(kPointerSize));
8965 __ subq(rdx, Immediate(kPointerSize)); 8965 __ subq(rdx, Immediate(kPointerSize));
8966 __ decq(rcx); 8966 __ decq(rcx);
8967 __ j(not_zero, &loop); 8967 __ j(not_zero, &loop);
(...skipping 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
11457 // Call the function from C++. 11457 // Call the function from C++.
11458 return FUNCTION_CAST<ModuloFunction>(buffer); 11458 return FUNCTION_CAST<ModuloFunction>(buffer);
11459 } 11459 }
11460 11460
11461 #endif 11461 #endif
11462 11462
11463 11463
11464 #undef __ 11464 #undef __
11465 11465
11466 } } // namespace v8::internal 11466 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698