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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 #undef DECLARE_BRANCH_PROTOTYPES | 174 #undef DECLARE_BRANCH_PROTOTYPES |
175 #undef COND_TYPED_ARGS | 175 #undef COND_TYPED_ARGS |
176 #undef COND_ARGS | 176 #undef COND_ARGS |
177 | 177 |
178 | 178 |
179 // Jump, Call, and Ret pseudo instructions implementing inter-working. | 179 // Jump, Call, and Ret pseudo instructions implementing inter-working. |
180 #define COND_ARGS Condition cond = al, Register rs = zero_reg, \ | 180 #define COND_ARGS Condition cond = al, Register rs = zero_reg, \ |
181 const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT | 181 const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT |
182 | 182 |
183 void Jump(Register target, COND_ARGS); | 183 void Jump(Register target, int16_t offset = 0, COND_ARGS); |
| 184 void Jump(Register target, Register base, int16_t offset = 0, COND_ARGS); |
| 185 void Jump(Register target, const Operand& offset, COND_ARGS); |
184 void Jump(intptr_t target, RelocInfo::Mode rmode, COND_ARGS); | 186 void Jump(intptr_t target, RelocInfo::Mode rmode, COND_ARGS); |
185 void Jump(Address target, RelocInfo::Mode rmode, COND_ARGS); | 187 void Jump(Address target, RelocInfo::Mode rmode, COND_ARGS); |
186 void Jump(Handle<Code> code, RelocInfo::Mode rmode, COND_ARGS); | 188 void Jump(Handle<Code> code, RelocInfo::Mode rmode, COND_ARGS); |
187 static int CallSize(Register target, COND_ARGS); | 189 static int CallSize(Register target, int16_t offset = 0, COND_ARGS); |
188 void Call(Register target, COND_ARGS); | 190 void Call(Register target, int16_t offset = 0, COND_ARGS); |
| 191 void Call(Register target, Register base, int16_t offset = 0, COND_ARGS); |
189 static int CallSize(Address target, RelocInfo::Mode rmode, COND_ARGS); | 192 static int CallSize(Address target, RelocInfo::Mode rmode, COND_ARGS); |
190 void Call(Address target, RelocInfo::Mode rmode, COND_ARGS); | 193 void Call(Address target, RelocInfo::Mode rmode, COND_ARGS); |
191 int CallSize(Handle<Code> code, | 194 int CallSize(Handle<Code> code, |
192 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 195 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
193 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 196 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
194 COND_ARGS); | 197 COND_ARGS); |
195 void Call(Handle<Code> code, | 198 void Call(Handle<Code> code, |
196 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 199 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
197 TypeFeedbackId ast_id = TypeFeedbackId::None(), | 200 TypeFeedbackId ast_id = TypeFeedbackId::None(), |
198 COND_ARGS); | 201 COND_ARGS); |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 // On entry, receiver_reg should point to the array object. scratch_reg gets | 1660 // On entry, receiver_reg should point to the array object. scratch_reg gets |
1658 // clobbered. If no info is present jump to no_memento_found, otherwise fall | 1661 // clobbered. If no info is present jump to no_memento_found, otherwise fall |
1659 // through. | 1662 // through. |
1660 void TestJSArrayForAllocationMemento(Register receiver_reg, | 1663 void TestJSArrayForAllocationMemento(Register receiver_reg, |
1661 Register scratch_reg, | 1664 Register scratch_reg, |
1662 Label* no_memento_found); | 1665 Label* no_memento_found); |
1663 | 1666 |
1664 bool IsDoubleZeroRegSet() { return has_double_zero_reg_set_; } | 1667 bool IsDoubleZeroRegSet() { return has_double_zero_reg_set_; } |
1665 | 1668 |
1666 private: | 1669 private: |
1667 void CallCFunctionHelper(Register function, | 1670 void CallCFunctionHelper(Register function_base, int16_t function_offset, |
1668 int num_reg_arguments, | 1671 int num_reg_arguments, int num_double_arguments); |
1669 int num_double_arguments); | |
1670 | 1672 |
1671 inline Register GetRtAsRegisterHelper(const Operand& rt, Register scratch); | 1673 inline Register GetRtAsRegisterHelper(const Operand& rt, Register scratch); |
1672 inline int32_t GetOffset(int32_t offset, Label* L, OffsetSize bits); | 1674 inline int32_t GetOffset(int32_t offset, Label* L, OffsetSize bits); |
1673 void BranchShortHelperR6(int32_t offset, Label* L); | 1675 void BranchShortHelperR6(int32_t offset, Label* L); |
1674 void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot); | 1676 void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot); |
1675 bool BranchShortHelperR6(int32_t offset, Label* L, Condition cond, | 1677 bool BranchShortHelperR6(int32_t offset, Label* L, Condition cond, |
1676 Register rs, const Operand& rt); | 1678 Register rs, const Operand& rt); |
1677 bool BranchShortHelper(int16_t offset, Label* L, Condition cond, Register rs, | 1679 bool BranchShortHelper(int16_t offset, Label* L, Condition cond, Register rs, |
1678 const Operand& rt, BranchDelaySlot bdslot); | 1680 const Operand& rt, BranchDelaySlot bdslot); |
1679 bool BranchShortCheck(int32_t offset, Label* L, Condition cond, Register rs, | 1681 bool BranchShortCheck(int32_t offset, Label* L, Condition cond, Register rs, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 dd(GetLabelFunction(index)); | 1805 dd(GetLabelFunction(index)); |
1804 } | 1806 } |
1805 } | 1807 } |
1806 | 1808 |
1807 #define ACCESS_MASM(masm) masm-> | 1809 #define ACCESS_MASM(masm) masm-> |
1808 | 1810 |
1809 } // namespace internal | 1811 } // namespace internal |
1810 } // namespace v8 | 1812 } // namespace v8 |
1811 | 1813 |
1812 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1814 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |