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/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 // JumpToExternalReference expects a0 to contain the number of arguments | 51 // JumpToExternalReference expects a0 to contain the number of arguments |
52 // including the receiver and the extra arguments. But a0 is only valid | 52 // including the receiver and the extra arguments. But a0 is only valid |
53 // if the called function is marked as DontAdaptArguments, otherwise we | 53 // if the called function is marked as DontAdaptArguments, otherwise we |
54 // need to load the argument count from the SharedFunctionInfo. | 54 // need to load the argument count from the SharedFunctionInfo. |
55 Label argc, done_argc; | 55 Label argc, done_argc; |
56 __ ld(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 56 __ ld(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
57 __ lw(a2, | 57 __ lw(a2, |
58 FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); | 58 FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); |
59 __ Branch(&argc, ne, a2, | 59 __ Branch(&argc, eq, a2, |
60 Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel)); | 60 Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel)); |
61 __ Daddu(a0, a2, num_extra_args + 1); | 61 __ Daddu(a0, a2, num_extra_args + 1); |
62 __ jmp(&done_argc); | 62 __ jmp(&done_argc); |
63 __ bind(&argc); | 63 __ bind(&argc); |
64 __ Daddu(a0, a0, num_extra_args + 1); | 64 __ Daddu(a0, a0, num_extra_args + 1); |
65 __ bind(&done_argc); | 65 __ bind(&done_argc); |
66 | 66 |
67 __ JumpToExternalReference(ExternalReference(id, masm->isolate())); | 67 __ JumpToExternalReference(ExternalReference(id, masm->isolate())); |
68 } | 68 } |
69 | 69 |
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 } | 1901 } |
1902 } | 1902 } |
1903 | 1903 |
1904 | 1904 |
1905 #undef __ | 1905 #undef __ |
1906 | 1906 |
1907 } // namespace internal | 1907 } // namespace internal |
1908 } // namespace v8 | 1908 } // namespace v8 |
1909 | 1909 |
1910 #endif // V8_TARGET_ARCH_MIPS64 | 1910 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |