| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC_MACRO_ASSEMBLER_PPC_H_ | 5 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
| 6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 6 #define V8_PPC_MACRO_ASSEMBLER_PPC_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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 // Call a code stub. | 924 // Call a code stub. |
| 925 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), | 925 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), |
| 926 Condition cond = al); | 926 Condition cond = al); |
| 927 | 927 |
| 928 // Call a code stub. | 928 // Call a code stub. |
| 929 void TailCallStub(CodeStub* stub, Condition cond = al); | 929 void TailCallStub(CodeStub* stub, Condition cond = al); |
| 930 | 930 |
| 931 // Call a runtime routine. | 931 // Call a runtime routine. |
| 932 void CallRuntime(const Runtime::Function* f, int num_arguments, | 932 void CallRuntime(const Runtime::Function* f, int num_arguments, |
| 933 SaveFPRegsMode save_doubles = kDontSaveFPRegs); | 933 SaveFPRegsMode save_doubles = kDontSaveFPRegs); |
| 934 void CallRuntimeSaveDoubles(Runtime::FunctionId id) { | 934 void CallRuntimeSaveDoubles(Runtime::FunctionId fid) { |
| 935 const Runtime::Function* function = Runtime::FunctionForId(id); | 935 const Runtime::Function* function = Runtime::FunctionForId(fid); |
| 936 CallRuntime(function, function->nargs, kSaveFPRegs); | 936 CallRuntime(function, function->nargs, kSaveFPRegs); |
| 937 } | 937 } |
| 938 | 938 |
| 939 // Convenience function: Same as above, but takes the fid instead. | 939 // Convenience function: Same as above, but takes the fid instead. |
| 940 void CallRuntime(Runtime::FunctionId id, int num_arguments, | 940 void CallRuntime(Runtime::FunctionId fid, |
| 941 SaveFPRegsMode save_doubles = kDontSaveFPRegs) { | 941 SaveFPRegsMode save_doubles = kDontSaveFPRegs) { |
| 942 CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles); | 942 const Runtime::Function* function = Runtime::FunctionForId(fid); |
| 943 CallRuntime(function, function->nargs, save_doubles); |
| 944 } |
| 945 |
| 946 // Convenience function: Same as above, but takes the fid instead. |
| 947 void CallRuntime(Runtime::FunctionId fid, int num_arguments, |
| 948 SaveFPRegsMode save_doubles = kDontSaveFPRegs) { |
| 949 CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles); |
| 943 } | 950 } |
| 944 | 951 |
| 945 // Convenience function: call an external reference. | 952 // Convenience function: call an external reference. |
| 946 void CallExternalReference(const ExternalReference& ext, int num_arguments); | 953 void CallExternalReference(const ExternalReference& ext, int num_arguments); |
| 947 | 954 |
| 948 // Tail call of a runtime routine (jump). | |
| 949 // Like JumpToExternalReference, but also takes care of passing the number | |
| 950 // of parameters. | |
| 951 void TailCallExternalReference(const ExternalReference& ext, | |
| 952 int num_arguments); | |
| 953 | |
| 954 // Convenience function: tail call a runtime routine (jump). | 955 // Convenience function: tail call a runtime routine (jump). |
| 955 void TailCallRuntime(Runtime::FunctionId fid, int num_arguments); | 956 void TailCallRuntime(Runtime::FunctionId fid); |
| 956 | 957 |
| 957 int CalculateStackPassedWords(int num_reg_arguments, | 958 int CalculateStackPassedWords(int num_reg_arguments, |
| 958 int num_double_arguments); | 959 int num_double_arguments); |
| 959 | 960 |
| 960 // Before calling a C-function from generated code, align arguments on stack. | 961 // Before calling a C-function from generated code, align arguments on stack. |
| 961 // After aligning the frame, non-register arguments must be stored in | 962 // After aligning the frame, non-register arguments must be stored in |
| 962 // sp[0], sp[4], etc., not pushed. The argument count assumes all arguments | 963 // sp[0], sp[4], etc., not pushed. The argument count assumes all arguments |
| 963 // are word sized. If double arguments are used, this function assumes that | 964 // are word sized. If double arguments are used, this function assumes that |
| 964 // all double arguments are stored before core registers; otherwise the | 965 // all double arguments are stored before core registers; otherwise the |
| 965 // correct alignment of the double values is not guaranteed. | 966 // correct alignment of the double values is not guaranteed. |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 #define ACCESS_MASM(masm) \ | 1577 #define ACCESS_MASM(masm) \ |
| 1577 masm->stop(__FILE_LINE__); \ | 1578 masm->stop(__FILE_LINE__); \ |
| 1578 masm-> | 1579 masm-> |
| 1579 #else | 1580 #else |
| 1580 #define ACCESS_MASM(masm) masm-> | 1581 #define ACCESS_MASM(masm) masm-> |
| 1581 #endif | 1582 #endif |
| 1582 } // namespace internal | 1583 } // namespace internal |
| 1583 } // namespace v8 | 1584 } // namespace v8 |
| 1584 | 1585 |
| 1585 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 1586 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
| OLD | NEW |