OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 int result_size); | 741 int result_size); |
742 | 742 |
743 // Before calling a C-function from generated code, align arguments on stack. | 743 // Before calling a C-function from generated code, align arguments on stack. |
744 // After aligning the frame, non-register arguments must be stored in | 744 // After aligning the frame, non-register arguments must be stored in |
745 // sp[0], sp[4], etc., not pushed. The argument count assumes all arguments | 745 // sp[0], sp[4], etc., not pushed. The argument count assumes all arguments |
746 // are word sized. | 746 // are word sized. |
747 // Some compilers/platforms require the stack to be aligned when calling | 747 // Some compilers/platforms require the stack to be aligned when calling |
748 // C++ code. | 748 // C++ code. |
749 // Needs a scratch register to do some arithmetic. This register will be | 749 // Needs a scratch register to do some arithmetic. This register will be |
750 // trashed. | 750 // trashed. |
751 void PrepareCallCFunction(int num_arguments, Register scratch); | 751 void PrepareCallCFunction(int num_reg_arguments, |
| 752 int num_double_registers, |
| 753 Register scratch); |
| 754 void PrepareCallCFunction(int num_reg_arguments, |
| 755 Register scratch); |
| 756 |
| 757 // There are two ways of passing double arguments on ARM, depending on |
| 758 // whether soft or hard floating point ABI is used. These functions |
| 759 // abstract parameter passing for the three different ways we call |
| 760 // C functions from generated code. |
| 761 void SetCallCDoubleArguments(DoubleRegister dreg); |
| 762 void SetCallCDoubleArguments(DoubleRegister dreg1, DoubleRegister dreg2); |
| 763 void SetCallCDoubleArguments(DoubleRegister dreg, Register reg); |
752 | 764 |
753 // Calls a C function and cleans up the space for arguments allocated | 765 // Calls a C function and cleans up the space for arguments allocated |
754 // by PrepareCallCFunction. The called function is not allowed to trigger a | 766 // by PrepareCallCFunction. The called function is not allowed to trigger a |
755 // garbage collection, since that might move the code and invalidate the | 767 // garbage collection, since that might move the code and invalidate the |
756 // return address (unless this is somehow accounted for by the called | 768 // return address (unless this is somehow accounted for by the called |
757 // function). | 769 // function). |
758 void CallCFunction(ExternalReference function, int num_arguments); | 770 void CallCFunction(ExternalReference function, int num_arguments); |
759 void CallCFunction(Register function, Register scratch, int num_arguments); | 771 void CallCFunction(Register function, Register scratch, int num_arguments); |
760 | 772 |
761 void GetCFunctionDoubleResult(const DoubleRegister dst); | 773 void GetCFunctionDoubleResult(const DoubleRegister dst); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1074 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1063 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1075 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1064 #else | 1076 #else |
1065 #define ACCESS_MASM(masm) masm-> | 1077 #define ACCESS_MASM(masm) masm-> |
1066 #endif | 1078 #endif |
1067 | 1079 |
1068 | 1080 |
1069 } } // namespace v8::internal | 1081 } } // namespace v8::internal |
1070 | 1082 |
1071 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1083 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |