OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 5156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5167 } | 5167 } |
5168 | 5168 |
5169 // Check if we have an arguments adaptor frame below the function frame. | 5169 // Check if we have an arguments adaptor frame below the function frame. |
5170 Label arguments_adaptor, arguments_done; | 5170 Label arguments_adaptor, arguments_done; |
5171 __ ld(a3, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); | 5171 __ ld(a3, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); |
5172 __ ld(a0, MemOperand(a3, StandardFrameConstants::kContextOffset)); | 5172 __ ld(a0, MemOperand(a3, StandardFrameConstants::kContextOffset)); |
5173 __ Branch(&arguments_adaptor, eq, a0, | 5173 __ Branch(&arguments_adaptor, eq, a0, |
5174 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 5174 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
5175 { | 5175 { |
5176 __ ld(a1, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 5176 __ ld(a1, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
5177 __ ld(a0, | 5177 __ lw(a0, |
5178 FieldMemOperand(a1, SharedFunctionInfo::kFormalParameterCountOffset)); | 5178 FieldMemOperand(a1, SharedFunctionInfo::kFormalParameterCountOffset)); |
5179 __ Dlsa(a2, a2, a0, kPointerSizeLog2); | 5179 __ Dlsa(a2, a2, a0, kPointerSizeLog2); |
5180 __ Daddu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset - | 5180 __ Daddu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset - |
5181 1 * kPointerSize)); | 5181 1 * kPointerSize)); |
5182 } | 5182 } |
5183 __ Branch(&arguments_done); | 5183 __ Branch(&arguments_done); |
5184 __ bind(&arguments_adaptor); | 5184 __ bind(&arguments_adaptor); |
5185 { | 5185 { |
5186 __ SmiLoadUntag( | 5186 __ SmiLoadUntag( |
5187 a0, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 5187 a0, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
5188 __ Dlsa(a2, a3, a0, kPointerSizeLog2); | 5188 __ Dlsa(a2, a3, a0, kPointerSizeLog2); |
5189 __ Daddu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset - | 5189 __ Daddu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset - |
5190 1 * kPointerSize)); | 5190 1 * kPointerSize)); |
5191 } | 5191 } |
5192 __ bind(&arguments_done); | 5192 __ bind(&arguments_done); |
5193 | 5193 |
5194 // ----------- S t a t e ------------- | 5194 // ----------- S t a t e ------------- |
5195 // -- cp : context | 5195 // -- cp : context |
5196 // -- a0 : number of rest parameters | 5196 // -- a0 : number of rest parameters |
5197 // -- a2 : pointer to first rest parameters | 5197 // -- a2 : pointer to first rest parameters |
(...skipping 17 matching lines...) Expand all Loading... |
5215 __ Daddu(a3, v0, Operand(FixedArray::kHeaderSize)); | 5215 __ Daddu(a3, v0, Operand(FixedArray::kHeaderSize)); |
5216 { | 5216 { |
5217 Label loop, done_loop; | 5217 Label loop, done_loop; |
5218 __ Dlsa(a1, a3, a0, kPointerSizeLog2); | 5218 __ Dlsa(a1, a3, a0, kPointerSizeLog2); |
5219 __ bind(&loop); | 5219 __ bind(&loop); |
5220 __ Branch(&done_loop, eq, a1, Operand(a3)); | 5220 __ Branch(&done_loop, eq, a1, Operand(a3)); |
5221 __ ld(at, MemOperand(a2, 0 * kPointerSize)); | 5221 __ ld(at, MemOperand(a2, 0 * kPointerSize)); |
5222 __ sd(at, FieldMemOperand(a3, 0 * kPointerSize)); | 5222 __ sd(at, FieldMemOperand(a3, 0 * kPointerSize)); |
5223 __ Dsubu(a2, a2, Operand(1 * kPointerSize)); | 5223 __ Dsubu(a2, a2, Operand(1 * kPointerSize)); |
5224 __ Daddu(a3, a3, Operand(1 * kPointerSize)); | 5224 __ Daddu(a3, a3, Operand(1 * kPointerSize)); |
5225 __ b(&loop); | 5225 __ Branch(&loop); |
5226 __ bind(&done_loop); | 5226 __ bind(&done_loop); |
5227 } | 5227 } |
5228 | 5228 |
5229 // Setup the rest parameter array in a3. | 5229 // Setup the rest parameter array in a3. |
5230 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, at); | 5230 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, at); |
5231 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kMapOffset)); | 5231 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kMapOffset)); |
5232 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); | 5232 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); |
5233 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kPropertiesOffset)); | 5233 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kPropertiesOffset)); |
5234 __ sd(v0, FieldMemOperand(a3, JSStrictArgumentsObject::kElementsOffset)); | 5234 __ sd(v0, FieldMemOperand(a3, JSStrictArgumentsObject::kElementsOffset)); |
5235 __ sd(a4, FieldMemOperand(a3, JSStrictArgumentsObject::kLengthOffset)); | 5235 __ sd(a4, FieldMemOperand(a3, JSStrictArgumentsObject::kLengthOffset)); |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5711 return_value_operand, NULL); | 5711 return_value_operand, NULL); |
5712 } | 5712 } |
5713 | 5713 |
5714 | 5714 |
5715 #undef __ | 5715 #undef __ |
5716 | 5716 |
5717 } // namespace internal | 5717 } // namespace internal |
5718 } // namespace v8 | 5718 } // namespace v8 |
5719 | 5719 |
5720 #endif // V8_TARGET_ARCH_MIPS64 | 5720 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |