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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 6056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6067 | 6067 |
6068 void MacroAssembler::CallCFunction(Register function, | 6068 void MacroAssembler::CallCFunction(Register function, |
6069 int num_arguments) { | 6069 int num_arguments) { |
6070 CallCFunction(function, num_arguments, 0); | 6070 CallCFunction(function, num_arguments, 0); |
6071 } | 6071 } |
6072 | 6072 |
6073 | 6073 |
6074 void MacroAssembler::CallCFunctionHelper(Register function, | 6074 void MacroAssembler::CallCFunctionHelper(Register function, |
6075 int num_reg_arguments, | 6075 int num_reg_arguments, |
6076 int num_double_arguments) { | 6076 int num_double_arguments) { |
| 6077 DCHECK_LE(num_reg_arguments + num_double_arguments, kMaxCParameters); |
6077 DCHECK(has_frame()); | 6078 DCHECK(has_frame()); |
6078 // Make sure that the stack is aligned before calling a C function unless | 6079 // Make sure that the stack is aligned before calling a C function unless |
6079 // running in the simulator. The simulator has its own alignment check which | 6080 // running in the simulator. The simulator has its own alignment check which |
6080 // provides more information. | 6081 // provides more information. |
6081 // The argument stots are presumed to have been set up by | 6082 // The argument stots are presumed to have been set up by |
6082 // PrepareCallCFunction. The C function must be called via t9, for mips ABI. | 6083 // PrepareCallCFunction. The C function must be called via t9, for mips ABI. |
6083 | 6084 |
6084 #if V8_HOST_ARCH_MIPS | 6085 #if V8_HOST_ARCH_MIPS |
6085 if (emit_debug_code()) { | 6086 if (emit_debug_code()) { |
6086 int frame_alignment = base::OS::ActivationFrameAlignment(); | 6087 int frame_alignment = base::OS::ActivationFrameAlignment(); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6484 if (mag.shift > 0) sra(result, result, mag.shift); | 6485 if (mag.shift > 0) sra(result, result, mag.shift); |
6485 srl(at, dividend, 31); | 6486 srl(at, dividend, 31); |
6486 Addu(result, result, Operand(at)); | 6487 Addu(result, result, Operand(at)); |
6487 } | 6488 } |
6488 | 6489 |
6489 | 6490 |
6490 } // namespace internal | 6491 } // namespace internal |
6491 } // namespace v8 | 6492 } // namespace v8 |
6492 | 6493 |
6493 #endif // V8_TARGET_ARCH_MIPS | 6494 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |