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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 __ bind(&done); | 2059 __ bind(&done); |
2060 __ DropAndRet(3); | 2060 __ DropAndRet(3); |
2061 | 2061 |
2062 // Do the runtime call to allocate the arguments object. | 2062 // Do the runtime call to allocate the arguments object. |
2063 __ bind(&runtime); | 2063 __ bind(&runtime); |
2064 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 2064 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
2065 } | 2065 } |
2066 | 2066 |
2067 | 2067 |
2068 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | 2068 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
2069 // sp[0] : index of rest parameter | 2069 // sp[0] : language mode |
2070 // sp[4] : number of parameters | 2070 // sp[4] : index of rest parameter |
2071 // sp[8] : receiver displacement | 2071 // sp[8] : number of parameters |
| 2072 // sp[12] : receiver displacement |
2072 // Check if the calling frame is an arguments adaptor frame. | 2073 // Check if the calling frame is an arguments adaptor frame. |
2073 | 2074 |
2074 Label runtime; | 2075 Label runtime; |
2075 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 2076 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
2076 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); | 2077 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
2077 __ Branch(&runtime, ne, a3, | 2078 __ Branch(&runtime, ne, a3, |
2078 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 2079 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
2079 | 2080 |
2080 // Patch the arguments.length and the parameters pointer. | 2081 // Patch the arguments.length and the parameters pointer. |
2081 __ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 2082 __ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
2082 __ sd(a1, MemOperand(sp, 1 * kPointerSize)); | 2083 __ sd(a1, MemOperand(sp, 2 * kPointerSize)); |
2083 __ SmiScale(at, a1, kPointerSizeLog2); | 2084 __ SmiScale(at, a1, kPointerSizeLog2); |
2084 | 2085 |
2085 __ Daddu(a3, a2, Operand(at)); | 2086 __ Daddu(a3, a2, Operand(at)); |
2086 | 2087 |
2087 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); | 2088 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
2088 __ sd(a3, MemOperand(sp, 2 * kPointerSize)); | 2089 __ sd(a3, MemOperand(sp, 3 * kPointerSize)); |
2089 | 2090 |
2090 // Do the runtime call to allocate the arguments object. | 2091 // Do the runtime call to allocate the arguments object. |
2091 __ bind(&runtime); | 2092 __ bind(&runtime); |
2092 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); | 2093 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); |
2093 } | 2094 } |
2094 | 2095 |
2095 | 2096 |
2096 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2097 void RegExpExecStub::Generate(MacroAssembler* masm) { |
2097 // Just jump directly to runtime if native RegExp is not selected at compile | 2098 // Just jump directly to runtime if native RegExp is not selected at compile |
2098 // time or if regexp entry in generated code is turned off runtime switch or | 2099 // time or if regexp entry in generated code is turned off runtime switch or |
2099 // at compilation. | 2100 // at compilation. |
2100 #ifdef V8_INTERPRETED_REGEXP | 2101 #ifdef V8_INTERPRETED_REGEXP |
2101 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 2102 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
2102 #else // V8_INTERPRETED_REGEXP | 2103 #else // V8_INTERPRETED_REGEXP |
(...skipping 3451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5554 kStackUnwindSpace, kInvalidStackOffset, | 5555 kStackUnwindSpace, kInvalidStackOffset, |
5555 MemOperand(fp, 6 * kPointerSize), NULL); | 5556 MemOperand(fp, 6 * kPointerSize), NULL); |
5556 } | 5557 } |
5557 | 5558 |
5558 | 5559 |
5559 #undef __ | 5560 #undef __ |
5560 | 5561 |
5561 } } // namespace v8::internal | 5562 } } // namespace v8::internal |
5562 | 5563 |
5563 #endif // V8_TARGET_ARCH_MIPS64 | 5564 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |