Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: src/mips/macro-assembler-mips.h

Issue 2542403002: MIPS: Use JIC/JIALC offset when possible (Closed)
Patch Set: Simplify using Call and Jump Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, int16_t offset = 0, COND_ARGS);
182 void Jump(Register target, Register base, int16_t offset = 0, COND_ARGS);
183 void Jump(Register target, const Operand& offset, COND_ARGS);
182 void Jump(intptr_t target, RelocInfo::Mode rmode, COND_ARGS); 184 void Jump(intptr_t target, RelocInfo::Mode rmode, COND_ARGS);
183 void Jump(Address target, RelocInfo::Mode rmode, COND_ARGS); 185 void Jump(Address target, RelocInfo::Mode rmode, COND_ARGS);
184 void Jump(Handle<Code> code, RelocInfo::Mode rmode, COND_ARGS); 186 void Jump(Handle<Code> code, RelocInfo::Mode rmode, COND_ARGS);
185 static int CallSize(Register target, COND_ARGS); 187 static int CallSize(Register target, int16_t offset = 0, COND_ARGS);
186 void Call(Register target, COND_ARGS); 188 void Call(Register target, int16_t offset = 0, COND_ARGS);
189 void Call(Register target, Register base, int16_t offset = 0, COND_ARGS);
187 static int CallSize(Address target, RelocInfo::Mode rmode, COND_ARGS); 190 static int CallSize(Address target, RelocInfo::Mode rmode, COND_ARGS);
188 void Call(Address target, RelocInfo::Mode rmode, COND_ARGS); 191 void Call(Address target, RelocInfo::Mode rmode, COND_ARGS);
189 int CallSize(Handle<Code> code, 192 int CallSize(Handle<Code> code,
190 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, 193 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
191 TypeFeedbackId ast_id = TypeFeedbackId::None(), 194 TypeFeedbackId ast_id = TypeFeedbackId::None(),
192 COND_ARGS); 195 COND_ARGS);
193 void Call(Handle<Code> code, 196 void Call(Handle<Code> code,
194 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, 197 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
195 TypeFeedbackId ast_id = TypeFeedbackId::None(), 198 TypeFeedbackId ast_id = TypeFeedbackId::None(),
196 COND_ARGS); 199 COND_ARGS);
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 bind(&no_memento_found); 1744 bind(&no_memento_found);
1742 } 1745 }
1743 1746
1744 // Jumps to found label if a prototype map has dictionary elements. 1747 // Jumps to found label if a prototype map has dictionary elements.
1745 void JumpIfDictionaryInPrototypeChain(Register object, Register scratch0, 1748 void JumpIfDictionaryInPrototypeChain(Register object, Register scratch0,
1746 Register scratch1, Label* found); 1749 Register scratch1, Label* found);
1747 1750
1748 bool IsDoubleZeroRegSet() { return has_double_zero_reg_set_; } 1751 bool IsDoubleZeroRegSet() { return has_double_zero_reg_set_; }
1749 1752
1750 private: 1753 private:
1751 void CallCFunctionHelper(Register function, 1754 void CallCFunctionHelper(Register function, int num_reg_arguments,
ivica.bogosavljevic 2016/12/12 13:29:39 the function is now a misleading name, a better na
1752 int num_reg_arguments, 1755 int num_double_arguments, uint32_t offset = 0);
1753 int num_double_arguments);
1754 1756
1755 inline Register GetRtAsRegisterHelper(const Operand& rt, Register scratch); 1757 inline Register GetRtAsRegisterHelper(const Operand& rt, Register scratch);
1756 inline int32_t GetOffset(int32_t offset, Label* L, OffsetSize bits); 1758 inline int32_t GetOffset(int32_t offset, Label* L, OffsetSize bits);
1757 void BranchShortHelperR6(int32_t offset, Label* L); 1759 void BranchShortHelperR6(int32_t offset, Label* L);
1758 void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot); 1760 void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot);
1759 bool BranchShortHelperR6(int32_t offset, Label* L, Condition cond, 1761 bool BranchShortHelperR6(int32_t offset, Label* L, Condition cond,
1760 Register rs, const Operand& rt); 1762 Register rs, const Operand& rt);
1761 bool BranchShortHelper(int16_t offset, Label* L, Condition cond, Register rs, 1763 bool BranchShortHelper(int16_t offset, Label* L, Condition cond, Register rs,
1762 const Operand& rt, BranchDelaySlot bdslot); 1764 const Operand& rt, BranchDelaySlot bdslot);
1763 bool BranchShortCheck(int32_t offset, Label* L, Condition cond, Register rs, 1765 bool BranchShortCheck(int32_t offset, Label* L, Condition cond, Register rs,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 dd(GetLabelFunction(index)); 1894 dd(GetLabelFunction(index));
1893 } 1895 }
1894 } 1896 }
1895 1897
1896 #define ACCESS_MASM(masm) masm-> 1898 #define ACCESS_MASM(masm) masm->
1897 1899
1898 } // namespace internal 1900 } // namespace internal
1899 } // namespace v8 1901 } // namespace v8
1900 1902
1901 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ 1903 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698