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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 __ MultiPopFPU(kCallerSavedFPU); | 829 __ MultiPopFPU(kCallerSavedFPU); |
830 } | 830 } |
831 | 831 |
832 __ MultiPop(kJSCallerSaved | ra.bit()); | 832 __ MultiPop(kJSCallerSaved | ra.bit()); |
833 __ Ret(); | 833 __ Ret(); |
834 } | 834 } |
835 | 835 |
836 | 836 |
837 void MathPowStub::Generate(MacroAssembler* masm) { | 837 void MathPowStub::Generate(MacroAssembler* masm) { |
838 const Register base = a1; | 838 const Register base = a1; |
839 const Register exponent = a2; | 839 const Register exponent = MathPowTaggedDescriptor::exponent(); |
| 840 DCHECK(exponent.is(a2)); |
840 const Register heapnumbermap = t1; | 841 const Register heapnumbermap = t1; |
841 const Register heapnumber = v0; | 842 const Register heapnumber = v0; |
842 const DoubleRegister double_base = f2; | 843 const DoubleRegister double_base = f2; |
843 const DoubleRegister double_exponent = f4; | 844 const DoubleRegister double_exponent = f4; |
844 const DoubleRegister double_result = f0; | 845 const DoubleRegister double_result = f0; |
845 const DoubleRegister double_scratch = f6; | 846 const DoubleRegister double_scratch = f6; |
846 const FPURegister single_scratch = f8; | 847 const FPURegister single_scratch = f8; |
847 const Register scratch = t5; | 848 const Register scratch = t5; |
848 const Register scratch2 = t3; | 849 const Register scratch2 = t3; |
849 | 850 |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 PropertyAccessCompiler::TailCallBuiltin( | 1592 PropertyAccessCompiler::TailCallBuiltin( |
1592 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 1593 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
1593 } | 1594 } |
1594 | 1595 |
1595 | 1596 |
1596 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 1597 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
1597 // The displacement is the offset of the last parameter (if any) | 1598 // The displacement is the offset of the last parameter (if any) |
1598 // relative to the frame pointer. | 1599 // relative to the frame pointer. |
1599 const int kDisplacement = | 1600 const int kDisplacement = |
1600 StandardFrameConstants::kCallerSPOffset - kPointerSize; | 1601 StandardFrameConstants::kCallerSPOffset - kPointerSize; |
| 1602 DCHECK(a1.is(ArgumentsAccessReadDescriptor::index())); |
| 1603 DCHECK(a0.is(ArgumentsAccessReadDescriptor::parameter_count())); |
1601 | 1604 |
1602 // Check that the key is a smiGenerateReadElement. | 1605 // Check that the key is a smiGenerateReadElement. |
1603 Label slow; | 1606 Label slow; |
1604 __ JumpIfNotSmi(a1, &slow); | 1607 __ JumpIfNotSmi(a1, &slow); |
1605 | 1608 |
1606 // Check if the calling frame is an arguments adaptor frame. | 1609 // Check if the calling frame is an arguments adaptor frame. |
1607 Label adaptor; | 1610 Label adaptor; |
1608 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 1611 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
1609 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); | 1612 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
1610 __ Branch(&adaptor, | 1613 __ Branch(&adaptor, |
(...skipping 3209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4820 | 4823 |
4821 | 4824 |
4822 void CallApiGetterStub::Generate(MacroAssembler* masm) { | 4825 void CallApiGetterStub::Generate(MacroAssembler* masm) { |
4823 // ----------- S t a t e ------------- | 4826 // ----------- S t a t e ------------- |
4824 // -- sp[0] : name | 4827 // -- sp[0] : name |
4825 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object | 4828 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object |
4826 // -- ... | 4829 // -- ... |
4827 // -- a2 : api_function_address | 4830 // -- a2 : api_function_address |
4828 // ----------------------------------- | 4831 // ----------------------------------- |
4829 | 4832 |
4830 Register api_function_address = a2; | 4833 Register api_function_address = ApiGetterDescriptor::function_address(); |
| 4834 DCHECK(api_function_address.is(a2)); |
4831 | 4835 |
4832 __ mov(a0, sp); // a0 = Handle<Name> | 4836 __ mov(a0, sp); // a0 = Handle<Name> |
4833 __ Addu(a1, a0, Operand(1 * kPointerSize)); // a1 = PCA | 4837 __ Addu(a1, a0, Operand(1 * kPointerSize)); // a1 = PCA |
4834 | 4838 |
4835 const int kApiStackSpace = 1; | 4839 const int kApiStackSpace = 1; |
4836 FrameScope frame_scope(masm, StackFrame::MANUAL); | 4840 FrameScope frame_scope(masm, StackFrame::MANUAL); |
4837 __ EnterExitFrame(false, kApiStackSpace); | 4841 __ EnterExitFrame(false, kApiStackSpace); |
4838 | 4842 |
4839 // Create PropertyAccessorInfo instance on the stack above the exit frame with | 4843 // Create PropertyAccessorInfo instance on the stack above the exit frame with |
4840 // a1 (internal::Object** args_) as the data. | 4844 // a1 (internal::Object** args_) as the data. |
(...skipping 10 matching lines...) Expand all Loading... |
4851 MemOperand(fp, 6 * kPointerSize), | 4855 MemOperand(fp, 6 * kPointerSize), |
4852 NULL); | 4856 NULL); |
4853 } | 4857 } |
4854 | 4858 |
4855 | 4859 |
4856 #undef __ | 4860 #undef __ |
4857 | 4861 |
4858 } } // namespace v8::internal | 4862 } } // namespace v8::internal |
4859 | 4863 |
4860 #endif // V8_TARGET_ARCH_MIPS | 4864 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |