Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index 3cd6740b684bab838e57b148bc82738d3debe84f..c280b37f79600d24bc99b3d4d31c93c23aada43d 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -2357,6 +2357,7 @@ void ArgumentsAccessStub::GenerateNewNonStrictFast(MacroAssembler* masm) { |
const int kParameterMapHeaderSize = |
FixedArray::kHeaderSize + 2 * kPointerSize; |
Label no_parameter_map; |
+ __ xor_(r8, r8); |
__ testq(rbx, rbx); |
__ j(zero, &no_parameter_map, Label::kNear); |
__ lea(r8, Operand(rbx, times_pointer_size, kParameterMapHeaderSize)); |
@@ -2450,16 +2451,13 @@ void ArgumentsAccessStub::GenerateNewNonStrictFast(MacroAssembler* masm) { |
Label parameters_loop, parameters_test; |
// Load tagged parameter count into r9. |
- __ movq(r9, Operand(rsp, 1 * kPointerSize)); |
+ __ Integer64PlusConstantToSmi(r9, rbx, 0); |
fschneider
2012/01/16 14:25:07
Isn't there an instruction to make a smi without a
|
__ Move(r8, Smi::FromInt(Context::MIN_CONTEXT_SLOTS)); |
- __ addq(r8, Operand(rsp, 3 * kPointerSize)); |
+ __ addq(r8, Operand(rsp, 1 * kPointerSize)); |
__ subq(r8, r9); |
__ Move(r11, factory->the_hole_value()); |
__ movq(rdx, rdi); |
- __ SmiToInteger64(kScratchRegister, r9); |
- __ lea(rdi, Operand(rdi, kScratchRegister, |
- times_pointer_size, |
- kParameterMapHeaderSize)); |
+ __ lea(rdi, Operand(rdi, rbx, times_pointer_size, kParameterMapHeaderSize)); |
// r9 = loop variable (tagged) |
// r8 = mapping index (tagged) |
// r11 = the hole value |
@@ -2497,7 +2495,6 @@ void ArgumentsAccessStub::GenerateNewNonStrictFast(MacroAssembler* masm) { |
__ movq(rdx, Operand(rsp, 2 * kPointerSize)); |
// Untag rcx and r8 for the loop below. |
fschneider
2012/01/16 14:25:07
Comment should say: Untag rcx for the loop below.
|
__ SmiToInteger64(rcx, rcx); |
- __ SmiToInteger64(r8, r8); |
__ lea(kScratchRegister, Operand(r8, times_pointer_size, 0)); |
__ subq(rdx, kScratchRegister); |
__ jmp(&arguments_test, Label::kNear); |