OLD | NEW |
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_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/mips/assembler-mips.h" | 10 #include "src/mips/assembler-mips.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 #undef DECLARE_BRANCH_PROTOTYPES | 172 #undef DECLARE_BRANCH_PROTOTYPES |
173 #undef COND_TYPED_ARGS | 173 #undef COND_TYPED_ARGS |
174 #undef COND_ARGS | 174 #undef COND_ARGS |
175 | 175 |
176 | 176 |
177 // Jump, Call, and Ret pseudo instructions implementing inter-working. | 177 // Jump, Call, and Ret pseudo instructions implementing inter-working. |
178 #define COND_ARGS Condition cond = al, Register rs = zero_reg, \ | 178 #define COND_ARGS Condition cond = al, Register rs = zero_reg, \ |
179 const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT | 179 const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT |
180 | 180 |
181 void Jump(Register target, COND_ARGS); | 181 void Jump(Register target, uint32_t offset = 0, COND_ARGS); |
182 void Jump(intptr_t target, RelocInfo::Mode rmode, COND_ARGS); | 182 void Jump(intptr_t target, RelocInfo::Mode rmode, COND_ARGS); |
183 void Jump(Address target, RelocInfo::Mode rmode, COND_ARGS); | 183 void Jump(Address target, RelocInfo::Mode rmode, COND_ARGS); |
184 void Jump(Handle<Code> code, RelocInfo::Mode rmode, COND_ARGS); | 184 void Jump(Handle<Code> code, RelocInfo::Mode rmode, COND_ARGS); |
185 static int CallSize(Register target, COND_ARGS); | 185 static int CallSize(Register target, COND_ARGS); |
186 void Call(Register target, COND_ARGS); | 186 void Call(Register target, uint32_t offset = 0, COND_ARGS); |
187 static int CallSize(Address target, RelocInfo::Mode rmode, COND_ARGS); | 187 static int CallSize(Address target, RelocInfo::Mode rmode, COND_ARGS); |
188 void Call(Address target, RelocInfo::Mode rmode, COND_ARGS); | 188 void Call(Address target, RelocInfo::Mode rmode, COND_ARGS); |
189 int CallSize(Handle<Code> code, | 189 int CallSize(Handle<Code> code, |
190 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 190 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
191 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 191 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
192 COND_ARGS); | 192 COND_ARGS); |
193 void Call(Handle<Code> code, | 193 void Call(Handle<Code> code, |
194 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 194 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
195 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 195 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
196 COND_ARGS); | 196 COND_ARGS); |
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 bind(&no_memento_found); | 1741 bind(&no_memento_found); |
1742 } | 1742 } |
1743 | 1743 |
1744 // Jumps to found label if a prototype map has dictionary elements. | 1744 // Jumps to found label if a prototype map has dictionary elements. |
1745 void JumpIfDictionaryInPrototypeChain(Register object, Register scratch0, | 1745 void JumpIfDictionaryInPrototypeChain(Register object, Register scratch0, |
1746 Register scratch1, Label* found); | 1746 Register scratch1, Label* found); |
1747 | 1747 |
1748 bool IsDoubleZeroRegSet() { return has_double_zero_reg_set_; } | 1748 bool IsDoubleZeroRegSet() { return has_double_zero_reg_set_; } |
1749 | 1749 |
1750 private: | 1750 private: |
1751 void CallCFunctionHelper(Register function, | 1751 void CallCFunctionHelper(Register function, int num_reg_arguments, |
1752 int num_reg_arguments, | 1752 int num_double_arguments, uint32_t offset = 0); |
1753 int num_double_arguments); | |
1754 | 1753 |
1755 inline Register GetRtAsRegisterHelper(const Operand& rt, Register scratch); | 1754 inline Register GetRtAsRegisterHelper(const Operand& rt, Register scratch); |
1756 inline int32_t GetOffset(int32_t offset, Label* L, OffsetSize bits); | 1755 inline int32_t GetOffset(int32_t offset, Label* L, OffsetSize bits); |
1757 void BranchShortHelperR6(int32_t offset, Label* L); | 1756 void BranchShortHelperR6(int32_t offset, Label* L); |
1758 void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot); | 1757 void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot); |
1759 bool BranchShortHelperR6(int32_t offset, Label* L, Condition cond, | 1758 bool BranchShortHelperR6(int32_t offset, Label* L, Condition cond, |
1760 Register rs, const Operand& rt); | 1759 Register rs, const Operand& rt); |
1761 bool BranchShortHelper(int16_t offset, Label* L, Condition cond, Register rs, | 1760 bool BranchShortHelper(int16_t offset, Label* L, Condition cond, Register rs, |
1762 const Operand& rt, BranchDelaySlot bdslot); | 1761 const Operand& rt, BranchDelaySlot bdslot); |
1763 bool BranchShortCheck(int32_t offset, Label* L, Condition cond, Register rs, | 1762 bool BranchShortCheck(int32_t offset, Label* L, Condition cond, Register rs, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1892 dd(GetLabelFunction(index)); | 1891 dd(GetLabelFunction(index)); |
1893 } | 1892 } |
1894 } | 1893 } |
1895 | 1894 |
1896 #define ACCESS_MASM(masm) masm-> | 1895 #define ACCESS_MASM(masm) masm-> |
1897 | 1896 |
1898 } // namespace internal | 1897 } // namespace internal |
1899 } // namespace v8 | 1898 } // namespace v8 |
1900 | 1899 |
1901 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1900 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |