| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_ | 5 #ifndef V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_ |
| 6 #define V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_ | 6 #define V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_ |
| 7 | 7 |
| 8 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
| 9 #include "src/ppc/assembler-ppc.h" | 9 #include "src/ppc/assembler-ppc.h" |
| 10 #include "src/ppc/frames-ppc.h" | 10 #include "src/ppc/frames-ppc.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual void Bind(Label* label); | 27 virtual void Bind(Label* label); |
| 28 virtual void CheckAtStart(Label* on_at_start); | 28 virtual void CheckAtStart(Label* on_at_start); |
| 29 virtual void CheckCharacter(unsigned c, Label* on_equal); | 29 virtual void CheckCharacter(unsigned c, Label* on_equal); |
| 30 virtual void CheckCharacterAfterAnd(unsigned c, unsigned mask, | 30 virtual void CheckCharacterAfterAnd(unsigned c, unsigned mask, |
| 31 Label* on_equal); | 31 Label* on_equal); |
| 32 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); | 32 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); |
| 33 virtual void CheckCharacterLT(uc16 limit, Label* on_less); | 33 virtual void CheckCharacterLT(uc16 limit, Label* on_less); |
| 34 // A "greedy loop" is a loop that is both greedy and with a simple | 34 // A "greedy loop" is a loop that is both greedy and with a simple |
| 35 // body. It has a particularly simple implementation. | 35 // body. It has a particularly simple implementation. |
| 36 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); | 36 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); |
| 37 virtual void CheckNotAtStart(Label* on_not_at_start); | 37 virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); |
| 38 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); | 38 virtual void CheckNotBackReference(int start_reg, bool read_backward, |
| 39 Label* on_no_match); |
| 39 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, | 40 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, |
| 41 bool read_backward, |
| 40 Label* on_no_match); | 42 Label* on_no_match); |
| 41 virtual void CheckNotCharacter(unsigned c, Label* on_not_equal); | 43 virtual void CheckNotCharacter(unsigned c, Label* on_not_equal); |
| 42 virtual void CheckNotCharacterAfterAnd(unsigned c, unsigned mask, | 44 virtual void CheckNotCharacterAfterAnd(unsigned c, unsigned mask, |
| 43 Label* on_not_equal); | 45 Label* on_not_equal); |
| 44 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, uc16 minus, uc16 mask, | 46 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, uc16 minus, uc16 mask, |
| 45 Label* on_not_equal); | 47 Label* on_not_equal); |
| 46 virtual void CheckCharacterInRange(uc16 from, uc16 to, Label* on_in_range); | 48 virtual void CheckCharacterInRange(uc16 from, uc16 to, Label* on_in_range); |
| 47 virtual void CheckCharacterNotInRange(uc16 from, uc16 to, | 49 virtual void CheckCharacterNotInRange(uc16 from, uc16 to, |
| 48 Label* on_not_in_range); | 50 Label* on_not_in_range); |
| 49 virtual void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set); | 51 virtual void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 static const int kStackHighEnd = kDirectCall - kPointerSize; | 107 static const int kStackHighEnd = kDirectCall - kPointerSize; |
| 106 static const int kNumOutputRegisters = kStackHighEnd - kPointerSize; | 108 static const int kNumOutputRegisters = kStackHighEnd - kPointerSize; |
| 107 static const int kRegisterOutput = kNumOutputRegisters - kPointerSize; | 109 static const int kRegisterOutput = kNumOutputRegisters - kPointerSize; |
| 108 static const int kInputEnd = kRegisterOutput - kPointerSize; | 110 static const int kInputEnd = kRegisterOutput - kPointerSize; |
| 109 static const int kInputStart = kInputEnd - kPointerSize; | 111 static const int kInputStart = kInputEnd - kPointerSize; |
| 110 static const int kStartIndex = kInputStart - kPointerSize; | 112 static const int kStartIndex = kInputStart - kPointerSize; |
| 111 static const int kInputString = kStartIndex - kPointerSize; | 113 static const int kInputString = kStartIndex - kPointerSize; |
| 112 // When adding local variables remember to push space for them in | 114 // When adding local variables remember to push space for them in |
| 113 // the frame in GetCode. | 115 // the frame in GetCode. |
| 114 static const int kSuccessfulCaptures = kInputString - kPointerSize; | 116 static const int kSuccessfulCaptures = kInputString - kPointerSize; |
| 115 static const int kInputStartMinusOne = kSuccessfulCaptures - kPointerSize; | 117 static const int kStringStartMinusOne = kSuccessfulCaptures - kPointerSize; |
| 116 // First register address. Following registers are below it on the stack. | 118 // First register address. Following registers are below it on the stack. |
| 117 static const int kRegisterZero = kInputStartMinusOne - kPointerSize; | 119 static const int kRegisterZero = kStringStartMinusOne - kPointerSize; |
| 118 | 120 |
| 119 // Initial size of code buffer. | 121 // Initial size of code buffer. |
| 120 static const size_t kRegExpCodeSize = 1024; | 122 static const size_t kRegExpCodeSize = 1024; |
| 121 | 123 |
| 122 // Load a number of characters at the given offset from the | 124 // Load a number of characters at the given offset from the |
| 123 // current position, into the current-character register. | 125 // current position, into the current-character register. |
| 124 void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); | 126 void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); |
| 125 | 127 |
| 126 // Check whether preemption has been requested. | 128 // Check whether preemption has been requested. |
| 127 void CheckPreemption(); | 129 void CheckPreemption(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 207 |
| 206 // Set of non-volatile registers saved/restored by generated regexp code. | 208 // Set of non-volatile registers saved/restored by generated regexp code. |
| 207 const RegList kRegExpCalleeSaved = | 209 const RegList kRegExpCalleeSaved = |
| 208 1 << 25 | 1 << 26 | 1 << 27 | 1 << 28 | 1 << 29 | 1 << 30 | 1 << 31; | 210 1 << 25 | 1 << 26 | 1 << 27 | 1 << 28 | 1 << 29 | 1 << 30 | 1 << 31; |
| 209 | 211 |
| 210 #endif // V8_INTERPRETED_REGEXP | 212 #endif // V8_INTERPRETED_REGEXP |
| 211 } // namespace internal | 213 } // namespace internal |
| 212 } // namespace v8 | 214 } // namespace v8 |
| 213 | 215 |
| 214 #endif // V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_ | 216 #endif // V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_ |
| OLD | NEW |