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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 __ MultiPopFPU(kCallerSavedFPU); | 824 __ MultiPopFPU(kCallerSavedFPU); |
825 } | 825 } |
826 | 826 |
827 __ MultiPop(kJSCallerSaved | ra.bit()); | 827 __ MultiPop(kJSCallerSaved | ra.bit()); |
828 __ Ret(); | 828 __ Ret(); |
829 } | 829 } |
830 | 830 |
831 | 831 |
832 void MathPowStub::Generate(MacroAssembler* masm) { | 832 void MathPowStub::Generate(MacroAssembler* masm) { |
833 const Register base = a1; | 833 const Register base = a1; |
834 const Register exponent = a2; | 834 const Register exponent = MathPowTaggedDescriptor::exponent(); |
| 835 DCHECK(exponent.is(a2)); |
835 const Register heapnumbermap = a5; | 836 const Register heapnumbermap = a5; |
836 const Register heapnumber = v0; | 837 const Register heapnumber = v0; |
837 const DoubleRegister double_base = f2; | 838 const DoubleRegister double_base = f2; |
838 const DoubleRegister double_exponent = f4; | 839 const DoubleRegister double_exponent = f4; |
839 const DoubleRegister double_result = f0; | 840 const DoubleRegister double_result = f0; |
840 const DoubleRegister double_scratch = f6; | 841 const DoubleRegister double_scratch = f6; |
841 const FPURegister single_scratch = f8; | 842 const FPURegister single_scratch = f8; |
842 const Register scratch = t1; | 843 const Register scratch = t1; |
843 const Register scratch2 = a7; | 844 const Register scratch2 = a7; |
844 | 845 |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 PropertyAccessCompiler::TailCallBuiltin( | 1591 PropertyAccessCompiler::TailCallBuiltin( |
1591 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 1592 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
1592 } | 1593 } |
1593 | 1594 |
1594 | 1595 |
1595 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 1596 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
1596 // The displacement is the offset of the last parameter (if any) | 1597 // The displacement is the offset of the last parameter (if any) |
1597 // relative to the frame pointer. | 1598 // relative to the frame pointer. |
1598 const int kDisplacement = | 1599 const int kDisplacement = |
1599 StandardFrameConstants::kCallerSPOffset - kPointerSize; | 1600 StandardFrameConstants::kCallerSPOffset - kPointerSize; |
| 1601 DCHECK(a1.is(ArgumentsAccessReadDescriptor::index())); |
| 1602 DCHECK(a0.is(ArgumentsAccessReadDescriptor::parameter_count())); |
1600 | 1603 |
1601 // Check that the key is a smiGenerateReadElement. | 1604 // Check that the key is a smiGenerateReadElement. |
1602 Label slow; | 1605 Label slow; |
1603 __ JumpIfNotSmi(a1, &slow); | 1606 __ JumpIfNotSmi(a1, &slow); |
1604 | 1607 |
1605 // Check if the calling frame is an arguments adaptor frame. | 1608 // Check if the calling frame is an arguments adaptor frame. |
1606 Label adaptor; | 1609 Label adaptor; |
1607 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 1610 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
1608 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); | 1611 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
1609 __ Branch(&adaptor, | 1612 __ Branch(&adaptor, |
(...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4858 | 4861 |
4859 | 4862 |
4860 void CallApiGetterStub::Generate(MacroAssembler* masm) { | 4863 void CallApiGetterStub::Generate(MacroAssembler* masm) { |
4861 // ----------- S t a t e ------------- | 4864 // ----------- S t a t e ------------- |
4862 // -- sp[0] : name | 4865 // -- sp[0] : name |
4863 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object | 4866 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object |
4864 // -- ... | 4867 // -- ... |
4865 // -- a2 : api_function_address | 4868 // -- a2 : api_function_address |
4866 // ----------------------------------- | 4869 // ----------------------------------- |
4867 | 4870 |
4868 Register api_function_address = a2; | 4871 Register api_function_address = ApiGetterDescriptor::function_address(); |
| 4872 DCHECK(api_function_address.is(a2)); |
4869 | 4873 |
4870 __ mov(a0, sp); // a0 = Handle<Name> | 4874 __ mov(a0, sp); // a0 = Handle<Name> |
4871 __ Daddu(a1, a0, Operand(1 * kPointerSize)); // a1 = PCA | 4875 __ Daddu(a1, a0, Operand(1 * kPointerSize)); // a1 = PCA |
4872 | 4876 |
4873 const int kApiStackSpace = 1; | 4877 const int kApiStackSpace = 1; |
4874 FrameScope frame_scope(masm, StackFrame::MANUAL); | 4878 FrameScope frame_scope(masm, StackFrame::MANUAL); |
4875 __ EnterExitFrame(false, kApiStackSpace); | 4879 __ EnterExitFrame(false, kApiStackSpace); |
4876 | 4880 |
4877 // Create PropertyAccessorInfo instance on the stack above the exit frame with | 4881 // Create PropertyAccessorInfo instance on the stack above the exit frame with |
4878 // a1 (internal::Object** args_) as the data. | 4882 // a1 (internal::Object** args_) as the data. |
(...skipping 10 matching lines...) Expand all Loading... |
4889 MemOperand(fp, 6 * kPointerSize), | 4893 MemOperand(fp, 6 * kPointerSize), |
4890 NULL); | 4894 NULL); |
4891 } | 4895 } |
4892 | 4896 |
4893 | 4897 |
4894 #undef __ | 4898 #undef __ |
4895 | 4899 |
4896 } } // namespace v8::internal | 4900 } } // namespace v8::internal |
4897 | 4901 |
4898 #endif // V8_TARGET_ARCH_MIPS64 | 4902 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |