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

Side by Side Diff: src/mips64/macro-assembler-mips64.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/mips/simulator-mips.cc ('k') | src/mips64/simulator-mips64.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_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
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
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
OLDNEW
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698