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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 __ Ret(); | 1962 __ Ret(); |
1963 | 1963 |
1964 // Do the runtime call to allocate the arguments object. | 1964 // Do the runtime call to allocate the arguments object. |
1965 __ bind(&runtime); | 1965 __ bind(&runtime); |
1966 __ Push(a1, a3, a2); | 1966 __ Push(a1, a3, a2); |
1967 __ TailCallRuntime(Runtime::kNewStrictArguments); | 1967 __ TailCallRuntime(Runtime::kNewStrictArguments); |
1968 } | 1968 } |
1969 | 1969 |
1970 | 1970 |
1971 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | 1971 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
1972 // sp[0] : language mode | 1972 // a2 : number of parameters (tagged) |
1973 // sp[4] : index of rest parameter | 1973 // a3 : parameters pointer |
1974 // sp[8] : number of parameters | 1974 // a4 : rest parameter index (tagged) |
1975 // sp[12] : receiver displacement | 1975 // a1 : language mode (tagged) |
1976 // Check if the calling frame is an arguments adaptor frame. | 1976 // Check if the calling frame is an arguments adaptor frame. |
1977 | 1977 |
1978 Label runtime; | 1978 Label runtime; |
1979 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 1979 __ ld(a0, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
1980 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); | 1980 __ ld(a5, MemOperand(a0, StandardFrameConstants::kContextOffset)); |
1981 __ Branch(&runtime, ne, a3, | 1981 __ Branch(&runtime, ne, a5, |
1982 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 1982 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
1983 | 1983 |
1984 // Patch the arguments.length and the parameters pointer. | 1984 // Patch the arguments.length and the parameters pointer. |
1985 __ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 1985 __ ld(a2, MemOperand(a0, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
1986 __ sd(a1, MemOperand(sp, 2 * kPointerSize)); | 1986 __ SmiScale(at, a2, kPointerSizeLog2); |
1987 __ SmiScale(at, a1, kPointerSizeLog2); | |
1988 | 1987 |
1989 __ Daddu(a3, a2, Operand(at)); | 1988 __ Daddu(a3, a0, Operand(at)); |
1990 | |
1991 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); | 1989 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
1992 __ sd(a3, MemOperand(sp, 3 * kPointerSize)); | |
1993 | 1990 |
1994 // Do the runtime call to allocate the arguments object. | 1991 // Do the runtime call to allocate the arguments object. |
1995 __ bind(&runtime); | 1992 __ bind(&runtime); |
| 1993 __ Push(a2, a3, a4, a1); |
1996 __ TailCallRuntime(Runtime::kNewRestParam); | 1994 __ TailCallRuntime(Runtime::kNewRestParam); |
1997 } | 1995 } |
1998 | 1996 |
1999 | 1997 |
2000 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1998 void RegExpExecStub::Generate(MacroAssembler* masm) { |
2001 // Just jump directly to runtime if native RegExp is not selected at compile | 1999 // Just jump directly to runtime if native RegExp is not selected at compile |
2002 // time or if regexp entry in generated code is turned off runtime switch or | 2000 // time or if regexp entry in generated code is turned off runtime switch or |
2003 // at compilation. | 2001 // at compilation. |
2004 #ifdef V8_INTERPRETED_REGEXP | 2002 #ifdef V8_INTERPRETED_REGEXP |
2005 __ TailCallRuntime(Runtime::kRegExpExec); | 2003 __ TailCallRuntime(Runtime::kRegExpExec); |
(...skipping 3619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5625 MemOperand(fp, 6 * kPointerSize), NULL); | 5623 MemOperand(fp, 6 * kPointerSize), NULL); |
5626 } | 5624 } |
5627 | 5625 |
5628 | 5626 |
5629 #undef __ | 5627 #undef __ |
5630 | 5628 |
5631 } // namespace internal | 5629 } // namespace internal |
5632 } // namespace v8 | 5630 } // namespace v8 |
5633 | 5631 |
5634 #endif // V8_TARGET_ARCH_MIPS64 | 5632 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |