Commit aed1f495 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Port r11704 to MIPS.

BUG=2174
TEST=regexp-global.js

Review URL: https://chromiumcodereview.appspot.com/10538080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 75a1fa91
...@@ -781,7 +781,7 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) { ...@@ -781,7 +781,7 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
for (int i = 0; i < num_saved_registers_; i += 2) { for (int i = 0; i < num_saved_registers_; i += 2) {
__ lw(a2, register_location(i)); __ lw(a2, register_location(i));
__ lw(a3, register_location(i + 1)); __ lw(a3, register_location(i + 1));
if (global()) { if (i == 0 && global_with_zero_length_check()) {
// Keep capture start in a4 for the zero-length check later. // Keep capture start in a4 for the zero-length check later.
__ mov(t7, a2); __ mov(t7, a2);
} }
...@@ -823,6 +823,8 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) { ...@@ -823,6 +823,8 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
// Prepare a0 to initialize registers with its value in the next run. // Prepare a0 to initialize registers with its value in the next run.
__ lw(a0, MemOperand(frame_pointer(), kInputStartMinusOne)); __ lw(a0, MemOperand(frame_pointer(), kInputStartMinusOne));
if (global_with_zero_length_check()) {
// Special case for zero-length matches. // Special case for zero-length matches.
// t7: capture start index // t7: capture start index
// Not a zero-length match, restart. // Not a zero-length match, restart.
...@@ -834,6 +836,8 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) { ...@@ -834,6 +836,8 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
__ Addu(current_input_offset(), __ Addu(current_input_offset(),
current_input_offset(), current_input_offset(),
Operand((mode_ == UC16) ? 2 : 1)); Operand((mode_ == UC16) ? 2 : 1));
}
__ Branch(&load_char_start_regexp); __ Branch(&load_char_start_regexp);
} else { } else {
__ li(v0, Operand(SUCCESS)); __ li(v0, Operand(SUCCESS));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment