OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 Register src, | 135 Register src, |
136 Register scratch, | 136 Register scratch, |
137 int lsb, | 137 int lsb, |
138 int width, | 138 int width, |
139 Condition cond = al); | 139 Condition cond = al); |
140 void Bfc(Register dst, int lsb, int width, Condition cond = al); | 140 void Bfc(Register dst, int lsb, int width, Condition cond = al); |
141 void Usat(Register dst, int satpos, const Operand& src, | 141 void Usat(Register dst, int satpos, const Operand& src, |
142 Condition cond = al); | 142 Condition cond = al); |
143 | 143 |
144 void Call(Label* target); | 144 void Call(Label* target); |
| 145 |
| 146 // Register move. May do nothing if the registers are identical. |
145 void Move(Register dst, Handle<Object> value); | 147 void Move(Register dst, Handle<Object> value); |
146 // May do nothing if the registers are identical. | |
147 void Move(Register dst, Register src); | 148 void Move(Register dst, Register src); |
| 149 void Move(DoubleRegister dst, DoubleRegister src); |
| 150 |
148 // Jumps to the label at the index given by the Smi in "index". | 151 // Jumps to the label at the index given by the Smi in "index". |
149 void SmiJumpTable(Register index, Vector<Label*> targets); | 152 void SmiJumpTable(Register index, Vector<Label*> targets); |
150 // Load an object from the root table. | 153 // Load an object from the root table. |
151 void LoadRoot(Register destination, | 154 void LoadRoot(Register destination, |
152 Heap::RootListIndex index, | 155 Heap::RootListIndex index, |
153 Condition cond = al); | 156 Condition cond = al); |
154 // Store an object to the root table. | 157 // Store an object to the root table. |
155 void StoreRoot(Register source, | 158 void StoreRoot(Register source, |
156 Heap::RootListIndex index, | 159 Heap::RootListIndex index, |
157 Condition cond = al); | 160 Condition cond = al); |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 const ExternalReference& ext, int num_arguments, int result_size); | 739 const ExternalReference& ext, int num_arguments, int result_size); |
737 | 740 |
738 // Convenience function: tail call a runtime routine (jump). | 741 // Convenience function: tail call a runtime routine (jump). |
739 void TailCallRuntime(Runtime::FunctionId fid, | 742 void TailCallRuntime(Runtime::FunctionId fid, |
740 int num_arguments, | 743 int num_arguments, |
741 int result_size); | 744 int result_size); |
742 | 745 |
743 // Before calling a C-function from generated code, align arguments on stack. | 746 // Before calling a C-function from generated code, align arguments on stack. |
744 // After aligning the frame, non-register arguments must be stored in | 747 // 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 | 748 // sp[0], sp[4], etc., not pushed. The argument count assumes all arguments |
746 // are word sized. | 749 // are word sized. If double arguments are used, this function assumes that |
| 750 // all double arguments are stored before core registers; otherwise the |
| 751 // correct alignment of the double values is not guaranteed. |
747 // Some compilers/platforms require the stack to be aligned when calling | 752 // Some compilers/platforms require the stack to be aligned when calling |
748 // C++ code. | 753 // C++ code. |
749 // Needs a scratch register to do some arithmetic. This register will be | 754 // Needs a scratch register to do some arithmetic. This register will be |
750 // trashed. | 755 // trashed. |
751 void PrepareCallCFunction(int num_arguments, Register scratch); | 756 void PrepareCallCFunction(int num_reg_arguments, |
| 757 int num_double_registers, |
| 758 Register scratch); |
| 759 void PrepareCallCFunction(int num_reg_arguments, |
| 760 Register scratch); |
| 761 |
| 762 // There are two ways of passing double arguments on ARM, depending on |
| 763 // whether soft or hard floating point ABI is used. These functions |
| 764 // abstract parameter passing for the three different ways we call |
| 765 // C functions from generated code. |
| 766 void SetCallCDoubleArguments(DoubleRegister dreg); |
| 767 void SetCallCDoubleArguments(DoubleRegister dreg1, DoubleRegister dreg2); |
| 768 void SetCallCDoubleArguments(DoubleRegister dreg, Register reg); |
752 | 769 |
753 // Calls a C function and cleans up the space for arguments allocated | 770 // Calls a C function and cleans up the space for arguments allocated |
754 // by PrepareCallCFunction. The called function is not allowed to trigger a | 771 // by PrepareCallCFunction. The called function is not allowed to trigger a |
755 // garbage collection, since that might move the code and invalidate the | 772 // garbage collection, since that might move the code and invalidate the |
756 // return address (unless this is somehow accounted for by the called | 773 // return address (unless this is somehow accounted for by the called |
757 // function). | 774 // function). |
758 void CallCFunction(ExternalReference function, int num_arguments); | 775 void CallCFunction(ExternalReference function, int num_arguments); |
759 void CallCFunction(Register function, Register scratch, int num_arguments); | 776 void CallCFunction(Register function, Register scratch, int num_arguments); |
760 | 777 |
761 void GetCFunctionDoubleResult(const DoubleRegister dst); | 778 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__) | 1079 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1063 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1080 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1064 #else | 1081 #else |
1065 #define ACCESS_MASM(masm) masm-> | 1082 #define ACCESS_MASM(masm) masm-> |
1066 #endif | 1083 #endif |
1067 | 1084 |
1068 | 1085 |
1069 } } // namespace v8::internal | 1086 } } // namespace v8::internal |
1070 | 1087 |
1071 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1088 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |