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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 6580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6591 | 6591 |
6592 void MacroAssembler::CallCFunction(Register function, | 6592 void MacroAssembler::CallCFunction(Register function, |
6593 int num_arguments) { | 6593 int num_arguments) { |
6594 CallCFunction(function, num_arguments, 0); | 6594 CallCFunction(function, num_arguments, 0); |
6595 } | 6595 } |
6596 | 6596 |
6597 | 6597 |
6598 void MacroAssembler::CallCFunctionHelper(Register function, | 6598 void MacroAssembler::CallCFunctionHelper(Register function, |
6599 int num_reg_arguments, | 6599 int num_reg_arguments, |
6600 int num_double_arguments) { | 6600 int num_double_arguments) { |
| 6601 DCHECK_LE(num_reg_arguments + num_double_arguments, kMaxCParameters); |
6601 DCHECK(has_frame()); | 6602 DCHECK(has_frame()); |
6602 // Make sure that the stack is aligned before calling a C function unless | 6603 // Make sure that the stack is aligned before calling a C function unless |
6603 // running in the simulator. The simulator has its own alignment check which | 6604 // running in the simulator. The simulator has its own alignment check which |
6604 // provides more information. | 6605 // provides more information. |
6605 // The argument stots are presumed to have been set up by | 6606 // The argument stots are presumed to have been set up by |
6606 // PrepareCallCFunction. The C function must be called via t9, for mips ABI. | 6607 // PrepareCallCFunction. The C function must be called via t9, for mips ABI. |
6607 | 6608 |
6608 #if V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64 | 6609 #if V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64 |
6609 if (emit_debug_code()) { | 6610 if (emit_debug_code()) { |
6610 int frame_alignment = base::OS::ActivationFrameAlignment(); | 6611 int frame_alignment = base::OS::ActivationFrameAlignment(); |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7012 if (mag.shift > 0) sra(result, result, mag.shift); | 7013 if (mag.shift > 0) sra(result, result, mag.shift); |
7013 srl(at, dividend, 31); | 7014 srl(at, dividend, 31); |
7014 Addu(result, result, Operand(at)); | 7015 Addu(result, result, Operand(at)); |
7015 } | 7016 } |
7016 | 7017 |
7017 | 7018 |
7018 } // namespace internal | 7019 } // namespace internal |
7019 } // namespace v8 | 7020 } // namespace v8 |
7020 | 7021 |
7021 #endif // V8_TARGET_ARCH_MIPS64 | 7022 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |