| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1970 __ Ret(); | 1970 __ Ret(); |
| 1971 | 1971 |
| 1972 // Do the runtime call to allocate the arguments object. | 1972 // Do the runtime call to allocate the arguments object. |
| 1973 __ bind(&runtime); | 1973 __ bind(&runtime); |
| 1974 __ Push(r4, r6, r5); | 1974 __ Push(r4, r6, r5); |
| 1975 __ TailCallRuntime(Runtime::kNewStrictArguments); | 1975 __ TailCallRuntime(Runtime::kNewStrictArguments); |
| 1976 } | 1976 } |
| 1977 | 1977 |
| 1978 | 1978 |
| 1979 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | 1979 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 1980 // Stack layout on entry. | 1980 // r5 : number of parameters (tagged) |
| 1981 // sp[0] : language mode | 1981 // r6 : parameters pointer |
| 1982 // sp[4] : index of rest parameter | 1982 // r7 : rest parameter index (tagged) |
| 1983 // sp[8] : number of parameters | 1983 // r4 : language mode (tagged) |
| 1984 // sp[12] : receiver displacement | |
| 1985 | 1984 |
| 1986 Label runtime; | 1985 Label runtime; |
| 1987 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 1986 __ LoadP(r8, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 1988 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset)); | 1987 __ LoadP(r3, MemOperand(r8, StandardFrameConstants::kContextOffset)); |
| 1989 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); | 1988 __ CmpSmiLiteral(r3, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); |
| 1990 __ bne(&runtime); | 1989 __ bne(&runtime); |
| 1991 | 1990 |
| 1992 // Patch the arguments.length and the parameters pointer. | 1991 // Patch the arguments.length and the parameters pointer. |
| 1993 __ LoadP(r4, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 1992 __ LoadP(r5, MemOperand(r8, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 1994 __ StoreP(r4, MemOperand(sp, 2 * kPointerSize)); | 1993 __ SmiToPtrArrayOffset(r0, r5); |
| 1995 __ SmiToPtrArrayOffset(r0, r4); | 1994 __ add(r6, r8, r0); |
| 1996 __ add(r6, r5, r0); | |
| 1997 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset)); | 1995 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 1998 __ StoreP(r6, MemOperand(sp, 3 * kPointerSize)); | |
| 1999 | 1996 |
| 2000 __ bind(&runtime); | 1997 __ bind(&runtime); |
| 1998 __ Push(r5, r6, r7, r4); |
| 2001 __ TailCallRuntime(Runtime::kNewRestParam); | 1999 __ TailCallRuntime(Runtime::kNewRestParam); |
| 2002 } | 2000 } |
| 2003 | 2001 |
| 2004 | 2002 |
| 2005 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2003 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 2006 // Just jump directly to runtime if native RegExp is not selected at compile | 2004 // Just jump directly to runtime if native RegExp is not selected at compile |
| 2007 // time or if regexp entry in generated code is turned off runtime switch or | 2005 // time or if regexp entry in generated code is turned off runtime switch or |
| 2008 // at compilation. | 2006 // at compilation. |
| 2009 #ifdef V8_INTERPRETED_REGEXP | 2007 #ifdef V8_INTERPRETED_REGEXP |
| 2010 __ TailCallRuntime(Runtime::kRegExpExec); | 2008 __ TailCallRuntime(Runtime::kRegExpExec); |
| (...skipping 3650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5661 kStackUnwindSpace, NULL, | 5659 kStackUnwindSpace, NULL, |
| 5662 MemOperand(fp, 6 * kPointerSize), NULL); | 5660 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5663 } | 5661 } |
| 5664 | 5662 |
| 5665 | 5663 |
| 5666 #undef __ | 5664 #undef __ |
| 5667 } // namespace internal | 5665 } // namespace internal |
| 5668 } // namespace v8 | 5666 } // namespace v8 |
| 5669 | 5667 |
| 5670 #endif // V8_TARGET_ARCH_PPC | 5668 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |