Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 2825393003: [sim] Consistent support for C calls with up to 9 args (Closed)
Patch Set: enum -> const variable Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/macro-assembler.h ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/macro-assembler.h ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698