| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 | 1061 |
| 1062 void CEntryStub::Generate(MacroAssembler* masm) { | 1062 void CEntryStub::Generate(MacroAssembler* masm) { |
| 1063 // Called from JavaScript; parameters are on stack as if calling JS function | 1063 // Called from JavaScript; parameters are on stack as if calling JS function |
| 1064 // a0: number of arguments including receiver | 1064 // a0: number of arguments including receiver |
| 1065 // a1: pointer to builtin function | 1065 // a1: pointer to builtin function |
| 1066 // fp: frame pointer (restored after C call) | 1066 // fp: frame pointer (restored after C call) |
| 1067 // sp: stack pointer (restored as callee's sp after C call) | 1067 // sp: stack pointer (restored as callee's sp after C call) |
| 1068 // cp: current context (C callee-saved) | 1068 // cp: current context (C callee-saved) |
| 1069 // | |
| 1070 // If argv_in_register(): | |
| 1071 // a2: pointer to the first argument | |
| 1072 | 1069 |
| 1073 ProfileEntryHookStub::MaybeCallEntryHook(masm); | 1070 ProfileEntryHookStub::MaybeCallEntryHook(masm); |
| 1074 | 1071 |
| 1075 if (!argv_in_register()) { | 1072 // Compute the argv pointer in a callee-saved register. |
| 1076 // Compute the argv pointer in a callee-saved register. | 1073 __ sll(s1, a0, kPointerSizeLog2); |
| 1077 __ sll(s1, a0, kPointerSizeLog2); | 1074 __ Addu(s1, sp, s1); |
| 1078 __ Addu(s1, sp, s1); | 1075 __ Subu(s1, s1, kPointerSize); |
| 1079 __ Subu(s1, s1, kPointerSize); | |
| 1080 } else { | |
| 1081 __ mov(s1, a2); | |
| 1082 } | |
| 1083 | 1076 |
| 1084 // Enter the exit frame that transitions from JavaScript to C++. | 1077 // Enter the exit frame that transitions from JavaScript to C++. |
| 1085 FrameScope scope(masm, StackFrame::MANUAL); | 1078 FrameScope scope(masm, StackFrame::MANUAL); |
| 1086 __ EnterExitFrame(save_doubles()); | 1079 __ EnterExitFrame(save_doubles()); |
| 1087 | 1080 |
| 1088 // s0: number of arguments including receiver (C callee-saved) | 1081 // s0: number of arguments including receiver (C callee-saved) |
| 1089 // s1: pointer to first argument (C callee-saved) | 1082 // s1: pointer to first argument (C callee-saved) |
| 1090 // s2: pointer to builtin function (C callee-saved) | 1083 // s2: pointer to builtin function (C callee-saved) |
| 1091 | 1084 |
| 1092 // Prepare arguments for C routine. | 1085 // Prepare arguments for C routine. |
| (...skipping 4641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5734 MemOperand(fp, 6 * kPointerSize), NULL); | 5727 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5735 } | 5728 } |
| 5736 | 5729 |
| 5737 | 5730 |
| 5738 #undef __ | 5731 #undef __ |
| 5739 | 5732 |
| 5740 } // namespace internal | 5733 } // namespace internal |
| 5741 } // namespace v8 | 5734 } // namespace v8 |
| 5742 | 5735 |
| 5743 #endif // V8_TARGET_ARCH_MIPS | 5736 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |