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

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

Issue 2825393003: [sim] Consistent support for C calls with up to 9 args (Closed)
Patch Set: enum -> const variable Created 3 years, 7 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/mips64/simulator-mips64.cc ('k') | test/cctest/test-code-stub-assembler.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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 4768 matching lines...) Expand 10 before | Expand all | Expand 10 after
4779 4779
4780 4780
4781 void MacroAssembler::CallCFunction(ExternalReference function, 4781 void MacroAssembler::CallCFunction(ExternalReference function,
4782 int num_arguments) { 4782 int num_arguments) {
4783 LoadAddress(rax, function); 4783 LoadAddress(rax, function);
4784 CallCFunction(rax, num_arguments); 4784 CallCFunction(rax, num_arguments);
4785 } 4785 }
4786 4786
4787 4787
4788 void MacroAssembler::CallCFunction(Register function, int num_arguments) { 4788 void MacroAssembler::CallCFunction(Register function, int num_arguments) {
4789 DCHECK_LE(num_arguments, kMaxCParameters);
4789 DCHECK(has_frame()); 4790 DCHECK(has_frame());
4790 // Check stack alignment. 4791 // Check stack alignment.
4791 if (emit_debug_code()) { 4792 if (emit_debug_code()) {
4792 CheckStackAlignment(); 4793 CheckStackAlignment();
4793 } 4794 }
4794 4795
4795 call(function); 4796 call(function);
4796 DCHECK(base::OS::ActivationFrameAlignment() != 0); 4797 DCHECK(base::OS::ActivationFrameAlignment() != 0);
4797 DCHECK(num_arguments >= 0); 4798 DCHECK(num_arguments >= 0);
4798 int argument_slots_on_stack = 4799 int argument_slots_on_stack =
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
5038 movl(rax, dividend); 5039 movl(rax, dividend);
5039 shrl(rax, Immediate(31)); 5040 shrl(rax, Immediate(31));
5040 addl(rdx, rax); 5041 addl(rdx, rax);
5041 } 5042 }
5042 5043
5043 5044
5044 } // namespace internal 5045 } // namespace internal
5045 } // namespace v8 5046 } // namespace v8
5046 5047
5047 #endif // V8_TARGET_ARCH_X64 5048 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/simulator-mips64.cc ('k') | test/cctest/test-code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698