OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_REGEXP_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_REGEXP_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ |
6 #define V8_REGEXP_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_REGEXP_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
9 #include "src/mips64/assembler-mips64.h" | 9 #include "src/mips64/assembler-mips64.h" |
10 #include "src/regexp/regexp-macro-assembler.h" | 10 #include "src/regexp/regexp-macro-assembler.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual void CheckAtStart(Label* on_at_start); | 26 virtual void CheckAtStart(Label* on_at_start); |
27 virtual void CheckCharacter(uint32_t c, Label* on_equal); | 27 virtual void CheckCharacter(uint32_t c, Label* on_equal); |
28 virtual void CheckCharacterAfterAnd(uint32_t c, | 28 virtual void CheckCharacterAfterAnd(uint32_t c, |
29 uint32_t mask, | 29 uint32_t mask, |
30 Label* on_equal); | 30 Label* on_equal); |
31 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); | 31 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); |
32 virtual void CheckCharacterLT(uc16 limit, Label* on_less); | 32 virtual void CheckCharacterLT(uc16 limit, Label* on_less); |
33 // A "greedy loop" is a loop that is both greedy and with a simple | 33 // A "greedy loop" is a loop that is both greedy and with a simple |
34 // body. It has a particularly simple implementation. | 34 // body. It has a particularly simple implementation. |
35 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); | 35 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); |
36 virtual void CheckNotAtStart(Label* on_not_at_start); | 36 virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); |
37 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); | 37 virtual void CheckNotBackReference(int start_reg, bool read_backward, |
| 38 Label* on_no_match); |
38 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, | 39 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, |
| 40 bool read_backward, |
39 Label* on_no_match); | 41 Label* on_no_match); |
40 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); | 42 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); |
41 virtual void CheckNotCharacterAfterAnd(uint32_t c, | 43 virtual void CheckNotCharacterAfterAnd(uint32_t c, |
42 uint32_t mask, | 44 uint32_t mask, |
43 Label* on_not_equal); | 45 Label* on_not_equal); |
44 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, | 46 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, |
45 uc16 minus, | 47 uc16 minus, |
46 uc16 mask, | 48 uc16 mask, |
47 Label* on_not_equal); | 49 Label* on_not_equal); |
48 virtual void CheckCharacterInRange(uc16 from, | 50 virtual void CheckCharacterInRange(uc16 from, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 static const int kStackHighEnd = kDirectCall - kPointerSize; | 120 static const int kStackHighEnd = kDirectCall - kPointerSize; |
119 static const int kNumOutputRegisters = kStackHighEnd - kPointerSize; | 121 static const int kNumOutputRegisters = kStackHighEnd - kPointerSize; |
120 static const int kRegisterOutput = kNumOutputRegisters - kPointerSize; | 122 static const int kRegisterOutput = kNumOutputRegisters - kPointerSize; |
121 static const int kInputEnd = kRegisterOutput - kPointerSize; | 123 static const int kInputEnd = kRegisterOutput - kPointerSize; |
122 static const int kInputStart = kInputEnd - kPointerSize; | 124 static const int kInputStart = kInputEnd - kPointerSize; |
123 static const int kStartIndex = kInputStart - kPointerSize; | 125 static const int kStartIndex = kInputStart - kPointerSize; |
124 static const int kInputString = kStartIndex - kPointerSize; | 126 static const int kInputString = kStartIndex - kPointerSize; |
125 // When adding local variables remember to push space for them in | 127 // When adding local variables remember to push space for them in |
126 // the frame in GetCode. | 128 // the frame in GetCode. |
127 static const int kSuccessfulCaptures = kInputString - kPointerSize; | 129 static const int kSuccessfulCaptures = kInputString - kPointerSize; |
128 static const int kInputStartMinusOne = kSuccessfulCaptures - kPointerSize; | 130 static const int kStringStartMinusOne = kSuccessfulCaptures - kPointerSize; |
129 // First register address. Following registers are below it on the stack. | 131 // First register address. Following registers are below it on the stack. |
130 static const int kRegisterZero = kInputStartMinusOne - kPointerSize; | 132 static const int kRegisterZero = kStringStartMinusOne - kPointerSize; |
131 | 133 |
132 #elif defined(MIPS_ABI_O32) | 134 #elif defined(MIPS_ABI_O32) |
133 // Offsets from frame_pointer() of function parameters and stored registers. | 135 // Offsets from frame_pointer() of function parameters and stored registers. |
134 static const int kFramePointer = 0; | 136 static const int kFramePointer = 0; |
135 | 137 |
136 // Above the frame pointer - Stored registers and stack passed parameters. | 138 // Above the frame pointer - Stored registers and stack passed parameters. |
137 // Registers s0 to s7, fp, and ra. | 139 // Registers s0 to s7, fp, and ra. |
138 static const int kStoredRegisters = kFramePointer; | 140 static const int kStoredRegisters = kFramePointer; |
139 // Return address (stored from link register, read into pc on return). | 141 // Return address (stored from link register, read into pc on return). |
140 static const int kReturnAddress = kStoredRegisters + 9 * kPointerSize; | 142 static const int kReturnAddress = kStoredRegisters + 9 * kPointerSize; |
(...skipping 10 matching lines...) Expand all Loading... |
151 | 153 |
152 // Below the frame pointer. | 154 // Below the frame pointer. |
153 // Register parameters stored by setup code. | 155 // Register parameters stored by setup code. |
154 static const int kInputEnd = kFramePointer - kPointerSize; | 156 static const int kInputEnd = kFramePointer - kPointerSize; |
155 static const int kInputStart = kInputEnd - kPointerSize; | 157 static const int kInputStart = kInputEnd - kPointerSize; |
156 static const int kStartIndex = kInputStart - kPointerSize; | 158 static const int kStartIndex = kInputStart - kPointerSize; |
157 static const int kInputString = kStartIndex - kPointerSize; | 159 static const int kInputString = kStartIndex - kPointerSize; |
158 // When adding local variables remember to push space for them in | 160 // When adding local variables remember to push space for them in |
159 // the frame in GetCode. | 161 // the frame in GetCode. |
160 static const int kSuccessfulCaptures = kInputString - kPointerSize; | 162 static const int kSuccessfulCaptures = kInputString - kPointerSize; |
161 static const int kInputStartMinusOne = kSuccessfulCaptures - kPointerSize; | 163 static const int kStringStartMinusOne = kSuccessfulCaptures - kPointerSize; |
162 // First register address. Following registers are below it on the stack. | 164 // First register address. Following registers are below it on the stack. |
163 static const int kRegisterZero = kInputStartMinusOne - kPointerSize; | 165 static const int kRegisterZero = kStringStartMinusOne - kPointerSize; |
164 | 166 |
165 #else | 167 #else |
166 # error "undefined MIPS ABI" | 168 # error "undefined MIPS ABI" |
167 #endif | 169 #endif |
168 | 170 |
169 // Initial size of code buffer. | 171 // Initial size of code buffer. |
170 static const size_t kRegExpCodeSize = 1024; | 172 static const size_t kRegExpCodeSize = 1024; |
171 | 173 |
172 // Load a number of characters at the given offset from the | 174 // Load a number of characters at the given offset from the |
173 // current position, into the current-character register. | 175 // current position, into the current-character register. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 Label internal_failure_label_; | 261 Label internal_failure_label_; |
260 }; | 262 }; |
261 | 263 |
262 #endif // V8_INTERPRETED_REGEXP | 264 #endif // V8_INTERPRETED_REGEXP |
263 | 265 |
264 | 266 |
265 } // namespace internal | 267 } // namespace internal |
266 } // namespace v8 | 268 } // namespace v8 |
267 | 269 |
268 #endif // V8_REGEXP_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ | 270 #endif // V8_REGEXP_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |