| OLD | NEW |
| 1 // Copyright 2006-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 Address re_frame); | 114 Address re_frame); |
| 115 private: | 115 private: |
| 116 // Offsets from frame_pointer() of function parameters and stored registers. | 116 // Offsets from frame_pointer() of function parameters and stored registers. |
| 117 static const int kFramePointer = 0; | 117 static const int kFramePointer = 0; |
| 118 | 118 |
| 119 // Above the frame pointer - Stored registers and stack passed parameters. | 119 // Above the frame pointer - Stored registers and stack passed parameters. |
| 120 // Registers s0 to s7, fp, and ra. | 120 // Registers s0 to s7, fp, and ra. |
| 121 static const int kStoredRegisters = kFramePointer; | 121 static const int kStoredRegisters = kFramePointer; |
| 122 // Return address (stored from link register, read into pc on return). | 122 // Return address (stored from link register, read into pc on return). |
| 123 static const int kReturnAddress = kStoredRegisters + 9 * kPointerSize; | 123 static const int kReturnAddress = kStoredRegisters + 9 * kPointerSize; |
| 124 static const int kSecondaryReturnAddress = kReturnAddress + kPointerSize; |
| 124 // Stack frame header. | 125 // Stack frame header. |
| 125 static const int kStackFrameHeader = kReturnAddress + kPointerSize; | 126 static const int kStackFrameHeader = kReturnAddress + kPointerSize; |
| 126 // Stack parameters placed by caller. | 127 // Stack parameters placed by caller. |
| 127 static const int kRegisterOutput = kStackFrameHeader + 16; | 128 static const int kRegisterOutput = kStackFrameHeader + 20; |
| 128 static const int kStackHighEnd = kRegisterOutput + kPointerSize; | 129 static const int kStackHighEnd = kRegisterOutput + kPointerSize; |
| 129 static const int kDirectCall = kStackHighEnd + kPointerSize; | 130 static const int kDirectCall = kStackHighEnd + kPointerSize; |
| 130 static const int kIsolate = kDirectCall + kPointerSize; | 131 static const int kIsolate = kDirectCall + kPointerSize; |
| 131 | 132 |
| 132 // Below the frame pointer. | 133 // Below the frame pointer. |
| 133 // Register parameters stored by setup code. | 134 // Register parameters stored by setup code. |
| 134 static const int kInputEnd = kFramePointer - kPointerSize; | 135 static const int kInputEnd = kFramePointer - kPointerSize; |
| 135 static const int kInputStart = kInputEnd - kPointerSize; | 136 static const int kInputStart = kInputEnd - kPointerSize; |
| 136 static const int kStartIndex = kInputStart - kPointerSize; | 137 static const int kStartIndex = kInputStart - kPointerSize; |
| 137 static const int kInputString = kStartIndex - kPointerSize; | 138 static const int kInputString = kStartIndex - kPointerSize; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // regexp registers are addressed relative to this. | 177 // regexp registers are addressed relative to this. |
| 177 inline Register frame_pointer() { return fp; } | 178 inline Register frame_pointer() { return fp; } |
| 178 | 179 |
| 179 // The register containing the backtrack stack top. Provides a meaningful | 180 // The register containing the backtrack stack top. Provides a meaningful |
| 180 // name to the register. | 181 // name to the register. |
| 181 inline Register backtrack_stackpointer() { return t4; } | 182 inline Register backtrack_stackpointer() { return t4; } |
| 182 | 183 |
| 183 // Register holding pointer to the current code object. | 184 // Register holding pointer to the current code object. |
| 184 inline Register code_pointer() { return t1; } | 185 inline Register code_pointer() { return t1; } |
| 185 | 186 |
| 186 // Byte size of chars in the string to match (decided by the Mode argument) | 187 // Byte size of chars in the string to match (decided by the Mode argument). |
| 187 inline int char_size() { return static_cast<int>(mode_); } | 188 inline int char_size() { return static_cast<int>(mode_); } |
| 188 | 189 |
| 189 // Equivalent to a conditional branch to the label, unless the label | 190 // Equivalent to a conditional branch to the label, unless the label |
| 190 // is NULL, in which case it is a conditional Backtrack. | 191 // is NULL, in which case it is a conditional Backtrack. |
| 191 void BranchOrBacktrack(Label* to, | 192 void BranchOrBacktrack(Label* to, |
| 192 Condition condition, | 193 Condition condition, |
| 193 Register rs, | 194 Register rs, |
| 194 const Operand& rt); | 195 const Operand& rt); |
| 195 | 196 |
| 196 // Call and return internally in the generated code in a way that | 197 // Call and return internally in the generated code in a way that |
| (...skipping 24 matching lines...) Expand all Loading... |
| 221 | 222 |
| 222 MacroAssembler* masm_; | 223 MacroAssembler* masm_; |
| 223 | 224 |
| 224 // Which mode to generate code for (ASCII or UC16). | 225 // Which mode to generate code for (ASCII or UC16). |
| 225 Mode mode_; | 226 Mode mode_; |
| 226 | 227 |
| 227 // One greater than maximal register index actually used. | 228 // One greater than maximal register index actually used. |
| 228 int num_registers_; | 229 int num_registers_; |
| 229 | 230 |
| 230 // Number of registers to output at the end (the saved registers | 231 // Number of registers to output at the end (the saved registers |
| 231 // are always 0..num_saved_registers_-1) | 232 // are always 0..num_saved_registers_-1). |
| 232 int num_saved_registers_; | 233 int num_saved_registers_; |
| 233 | 234 |
| 234 // Labels used internally. | 235 // Labels used internally. |
| 235 Label entry_label_; | 236 Label entry_label_; |
| 236 Label start_label_; | 237 Label start_label_; |
| 237 Label success_label_; | 238 Label success_label_; |
| 238 Label backtrack_label_; | 239 Label backtrack_label_; |
| 239 Label exit_label_; | 240 Label exit_label_; |
| 240 Label check_preempt_label_; | 241 Label check_preempt_label_; |
| 241 Label stack_overflow_label_; | 242 Label stack_overflow_label_; |
| 243 Label internal_failure_label_; |
| 242 }; | 244 }; |
| 243 | 245 |
| 244 #endif // V8_INTERPRETED_REGEXP | 246 #endif // V8_INTERPRETED_REGEXP |
| 245 | 247 |
| 246 | 248 |
| 247 }} // namespace v8::internal | 249 }} // namespace v8::internal |
| 248 | 250 |
| 249 #endif // V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ | 251 #endif // V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_ |
| 250 | 252 |
| OLD | NEW |