29 #ifndef V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
30 #define V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
41 #ifndef V8_INTERPRETED_REGEXP
50 virtual void Bind(Label* label);
61 bool check_end_of_string);
82 Label* on_not_in_range);
87 virtual void CheckPosition(
int cp_offset, Label* on_outside_input);
92 virtual void GoTo(Label* label);
93 virtual void IfRegisterGE(
int reg,
int comparand, Label* if_ge);
94 virtual void IfRegisterLT(
int reg,
int comparand, Label* if_lt);
98 Label* on_end_of_input,
99 bool check_bounds =
true,
110 virtual void SetRegister(
int register_index,
int to);
126 static const int kFramePointer = 0;
130 static const int kStoredRegisters = kFramePointer;
132 static const int kReturnAddress = kStoredRegisters + 9 *
kPointerSize;
133 static const int kSecondaryReturnAddress = kReturnAddress +
kPointerSize;
135 static const int kStackFrameHeader = kReturnAddress +
kPointerSize;
137 static const int kRegisterOutput = kStackFrameHeader + 20;
138 static const int kNumOutputRegisters = kRegisterOutput +
kPointerSize;
139 static const int kStackHighEnd = kNumOutputRegisters +
kPointerSize;
140 static const int kDirectCall = kStackHighEnd +
kPointerSize;
145 static const int kInputEnd = kFramePointer -
kPointerSize;
146 static const int kInputStart = kInputEnd -
kPointerSize;
147 static const int kStartIndex = kInputStart -
kPointerSize;
148 static const int kInputString = kStartIndex -
kPointerSize;
151 static const int kSuccessfulCaptures = kInputString -
kPointerSize;
152 static const int kInputStartMinusOne = kSuccessfulCaptures -
kPointerSize;
154 static const int kRegisterZero = kInputStartMinusOne -
kPointerSize;
157 static const size_t kRegExpCodeSize = 1024;
161 void LoadCurrentCharacterUnchecked(
int cp_offset,
int character_count);
164 void CheckPreemption();
167 void CheckStackLimit();
171 void CallCheckStackGuardState(
Register scratch);
174 MemOperand register_location(
int register_index);
178 inline Register current_input_offset() {
return t2; }
181 inline Register current_character() {
return t3; }
184 inline Register end_of_input_address() {
return t6; }
188 inline Register frame_pointer() {
return fp; }
192 inline Register backtrack_stackpointer() {
return t4; }
195 inline Register code_pointer() {
return t1; }
198 inline int char_size() {
return static_cast<int>(mode_); }
202 void BranchOrBacktrack(Label* to,
209 inline void SafeCall(Label* to,
213 inline void SafeReturn();
214 inline void SafeCallTarget(Label* name);
229 inline void CallCFunctionUsingStub(ExternalReference
function,
243 int num_saved_registers_;
248 Label success_label_;
249 Label backtrack_label_;
251 Label check_preempt_label_;
252 Label stack_overflow_label_;
253 Label internal_failure_label_;
256 #endif // V8_INTERPRETED_REGEXP
261 #endif // V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
RegExpMacroAssemblerMIPS(Mode mode, int registers_to_save, Zone *zone)
virtual void AdvanceRegister(int reg, int by)
virtual void PushCurrentPosition()
virtual void CheckCharacter(uint32_t c, Label *on_equal)
virtual void CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask, Label *on_not_equal)
virtual bool CheckSpecialCharacterClass(uc16 type, Label *on_no_match)
virtual void CheckCharacterAfterAnd(uint32_t c, uint32_t mask, Label *on_equal)
virtual void CheckNotAtStart(Label *on_not_at_start)
virtual void CheckCharacters(Vector< const uc16 > str, int cp_offset, Label *on_failure, bool check_end_of_string)
virtual void ReadCurrentPositionFromRegister(int reg)
virtual void GoTo(Label *label)
virtual void CheckNotBackReference(int start_reg, Label *on_no_match)
virtual void PushBacktrack(Label *label)
virtual void PopCurrentPosition()
virtual void IfRegisterGE(int reg, int comparand, Label *if_ge)
virtual void CheckNotCharacter(uint32_t c, Label *on_not_equal)
virtual void SetCurrentPositionFromEnd(int by)
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, Label *on_no_match)
virtual Handle< HeapObject > GetCode(Handle< String > source)
virtual void CheckAtStart(Label *on_at_start)
virtual void PopRegister(int register_index)
virtual void SetRegister(int register_index, int to)
virtual void IfRegisterLT(int reg, int comparand, Label *if_lt)
virtual void ClearRegisters(int reg_from, int reg_to)
virtual bool CanReadUnaligned()
virtual void PushRegister(int register_index, StackCheckFlag check_stack_limit)
virtual void CheckCharacterLT(uc16 limit, Label *on_less)
virtual int stack_limit_slack()
virtual void AdvanceCurrentPosition(int by)
virtual void WriteStackPointerToRegister(int reg)
virtual void IfRegisterEqPos(int reg, Label *if_eq)
virtual void LoadCurrentCharacter(int cp_offset, Label *on_end_of_input, bool check_bounds=true, int characters=1)
virtual IrregexpImplementation Implementation()
static int CheckStackGuardState(Address *return_address, Code *re_code, Address re_frame)
virtual void CheckCharacterInRange(uc16 from, uc16 to, Label *on_in_range)
virtual void CheckCharacterNotInRange(uc16 from, uc16 to, Label *on_not_in_range)
virtual void CheckBitInTable(Handle< ByteArray > table, Label *on_bit_set)
virtual void CheckCharacterGT(uc16 limit, Label *on_greater)
virtual ~RegExpMacroAssemblerMIPS()
virtual void CheckPosition(int cp_offset, Label *on_outside_input)
virtual void WriteCurrentPositionToRegister(int reg, int cp_offset)
virtual void CheckGreedyLoop(Label *on_tos_equals_current_position)
virtual void Bind(Label *label)
virtual void CheckNotCharacterAfterMinusAnd(uc16 c, uc16 minus, uc16 mask, Label *on_not_equal)
virtual void ReadStackPointerFromRegister(int reg)