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

Side by Side Diff: src/x87/macro-assembler-x87.h

Issue 1559693002: X87: [runtime] TailCallRuntime and CallRuntime should use default argument counts specified in runt… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/x87/macro-assembler-x87.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 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_
6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ 6 #define V8_X87_MACRO_ASSEMBLER_X87_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 // Tail call a code stub (jump). Generate the code if necessary. 654 // Tail call a code stub (jump). Generate the code if necessary.
655 void TailCallStub(CodeStub* stub); 655 void TailCallStub(CodeStub* stub);
656 656
657 // Return from a code stub after popping its arguments. 657 // Return from a code stub after popping its arguments.
658 void StubReturn(int argc); 658 void StubReturn(int argc);
659 659
660 // Call a runtime routine. 660 // Call a runtime routine.
661 void CallRuntime(const Runtime::Function* f, int num_arguments, 661 void CallRuntime(const Runtime::Function* f, int num_arguments,
662 SaveFPRegsMode save_doubles = kDontSaveFPRegs); 662 SaveFPRegsMode save_doubles = kDontSaveFPRegs);
663 void CallRuntimeSaveDoubles(Runtime::FunctionId id) { 663 void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
664 const Runtime::Function* function = Runtime::FunctionForId(id); 664 const Runtime::Function* function = Runtime::FunctionForId(fid);
665 CallRuntime(function, function->nargs, kSaveFPRegs); 665 CallRuntime(function, function->nargs, kSaveFPRegs);
666 } 666 }
667 667
668 // Convenience function: Same as above, but takes the fid instead. 668 // Convenience function: Same as above, but takes the fid instead.
669 void CallRuntime(Runtime::FunctionId id, int num_arguments, 669 void CallRuntime(Runtime::FunctionId fid,
670 SaveFPRegsMode save_doubles = kDontSaveFPRegs) { 670 SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
671 CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles); 671 const Runtime::Function* function = Runtime::FunctionForId(fid);
672 CallRuntime(function, function->nargs, save_doubles);
673 }
674
675 // Convenience function: Same as above, but takes the fid instead.
676 void CallRuntime(Runtime::FunctionId fid, int num_arguments,
677 SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
678 CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
672 } 679 }
673 680
674 // Convenience function: call an external reference. 681 // Convenience function: call an external reference.
675 void CallExternalReference(ExternalReference ref, int num_arguments); 682 void CallExternalReference(ExternalReference ref, int num_arguments);
676 683
677 // Tail call of a runtime routine (jump).
678 // Like JumpToExternalReference, but also takes care of passing the number
679 // of parameters.
680 void TailCallExternalReference(const ExternalReference& ext,
681 int num_arguments);
682
683 // Convenience function: tail call a runtime routine (jump). 684 // Convenience function: tail call a runtime routine (jump).
684 void TailCallRuntime(Runtime::FunctionId fid, int num_arguments); 685 void TailCallRuntime(Runtime::FunctionId fid);
685 686
686 // Before calling a C-function from generated code, align arguments on stack. 687 // Before calling a C-function from generated code, align arguments on stack.
687 // After aligning the frame, arguments must be stored in esp[0], esp[4], 688 // After aligning the frame, arguments must be stored in esp[0], esp[4],
688 // etc., not pushed. The argument count assumes all arguments are word sized. 689 // etc., not pushed. The argument count assumes all arguments are word sized.
689 // Some compilers/platforms require the stack to be aligned when calling 690 // Some compilers/platforms require the stack to be aligned when calling
690 // C++ code. 691 // C++ code.
691 // Needs a scratch register to do some arithmetic. This register will be 692 // Needs a scratch register to do some arithmetic. This register will be
692 // trashed. 693 // trashed.
693 void PrepareCallCFunction(int num_arguments, Register scratch); 694 void PrepareCallCFunction(int num_arguments, Register scratch);
694 695
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 } \ 983 } \
983 masm-> 984 masm->
984 #else 985 #else
985 #define ACCESS_MASM(masm) masm-> 986 #define ACCESS_MASM(masm) masm->
986 #endif 987 #endif
987 988
988 } // namespace internal 989 } // namespace internal
989 } // namespace v8 990 } // namespace v8
990 991
991 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ 992 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_
OLDNEW
« no previous file with comments | « no previous file | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698