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

Side by Side Diff: src/arm/macro-assembler-arm.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 | « no previous file | src/arm/simulator-arm.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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3255 matching lines...) Expand 10 before | Expand all | Expand 10 after
3266 3266
3267 void MacroAssembler::CallCFunction(Register function, 3267 void MacroAssembler::CallCFunction(Register function,
3268 int num_arguments) { 3268 int num_arguments) {
3269 CallCFunction(function, num_arguments, 0); 3269 CallCFunction(function, num_arguments, 0);
3270 } 3270 }
3271 3271
3272 3272
3273 void MacroAssembler::CallCFunctionHelper(Register function, 3273 void MacroAssembler::CallCFunctionHelper(Register function,
3274 int num_reg_arguments, 3274 int num_reg_arguments,
3275 int num_double_arguments) { 3275 int num_double_arguments) {
3276 DCHECK_LE(num_reg_arguments + num_double_arguments, kMaxCParameters);
3276 DCHECK(has_frame()); 3277 DCHECK(has_frame());
3277 // Make sure that the stack is aligned before calling a C function unless 3278 // Make sure that the stack is aligned before calling a C function unless
3278 // running in the simulator. The simulator has its own alignment check which 3279 // running in the simulator. The simulator has its own alignment check which
3279 // provides more information. 3280 // provides more information.
3280 #if V8_HOST_ARCH_ARM 3281 #if V8_HOST_ARCH_ARM
3281 if (emit_debug_code()) { 3282 if (emit_debug_code()) {
3282 int frame_alignment = base::OS::ActivationFrameAlignment(); 3283 int frame_alignment = base::OS::ActivationFrameAlignment();
3283 int frame_alignment_mask = frame_alignment - 1; 3284 int frame_alignment_mask = frame_alignment - 1;
3284 if (frame_alignment > kPointerSize) { 3285 if (frame_alignment > kPointerSize) {
3285 DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); 3286 DCHECK(base::bits::IsPowerOfTwo32(frame_alignment));
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
3676 } 3677 }
3677 } 3678 }
3678 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3679 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3679 add(result, result, Operand(dividend, LSR, 31)); 3680 add(result, result, Operand(dividend, LSR, 31));
3680 } 3681 }
3681 3682
3682 } // namespace internal 3683 } // namespace internal
3683 } // namespace v8 3684 } // namespace v8
3684 3685
3685 #endif // V8_TARGET_ARCH_ARM 3686 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698