Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: src/mips/code-stubs-mips.cc

Issue 7779030: MIPS: ported r9119 fixing performance regression in regexp. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 7ca78f6ad72ab5abd65825bb0e1a8a2e5645bb90..4acc2488a510d93399931d1e8fcfcd91961465e7 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -4669,7 +4669,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// frame. Therefore we have to use fp, which points exactly to two pointer
// sizes below the previous sp. (Because creating a new stack frame pushes
// the previous fp onto the stack and moves up sp by 2 * kPointerSize.)
- __ lw(a0, MemOperand(fp, kSubjectOffset + 2 * kPointerSize));
+ __ lw(subject, MemOperand(fp, kSubjectOffset + 2 * kPointerSize));
// If slice offset is not 0, load the length from the original sliced string.
// Argument 4, a3: End of string data
// Argument 3, a2: Start of string data
@@ -4679,7 +4679,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ sllv(t1, a1, a3);
__ addu(a2, t0, t1);
- __ lw(t2, FieldMemOperand(a0, String::kLengthOffset));
+ __ lw(t2, FieldMemOperand(subject, String::kLengthOffset));
__ sra(t2, t2, kSmiTagSize);
__ sllv(t1, t2, a3);
__ addu(a3, t0, t1);
@@ -4687,7 +4687,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Already there
// Argument 1 (a0): Subject string.
- // Already there
+ __ mov(a0, subject);
// Locate the code entry and call it.
__ Addu(t9, t9, Operand(Code::kHeaderSize - kHeapObjectTag));
@@ -4705,13 +4705,13 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
Label success;
__ Branch(&success, eq,
- subject, Operand(NativeRegExpMacroAssembler::SUCCESS));
+ v0, Operand(NativeRegExpMacroAssembler::SUCCESS));
Label failure;
__ Branch(&failure, eq,
- subject, Operand(NativeRegExpMacroAssembler::FAILURE));
+ v0, Operand(NativeRegExpMacroAssembler::FAILURE));
// If not exception it can only be retry. Handle that in the runtime system.
__ Branch(&runtime, ne,
- subject, Operand(NativeRegExpMacroAssembler::EXCEPTION));
+ v0, Operand(NativeRegExpMacroAssembler::EXCEPTION));
// Result must now be exception. If there is no pending exception already a
// stack overflow (on the backtrack stack) was detected in RegExp code but
// haven't created the exception yet. Handle that in the runtime system.
@@ -4722,16 +4722,16 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ li(a2, Operand(ExternalReference(Isolate::k_pending_exception_address,
masm->isolate())));
__ lw(v0, MemOperand(a2, 0));
- __ Branch(&runtime, eq, subject, Operand(a1));
+ __ Branch(&runtime, eq, v0, Operand(a1));
__ sw(a1, MemOperand(a2, 0)); // Clear pending exception.
// Check if the exception is a termination. If so, throw as uncatchable.
__ LoadRoot(a0, Heap::kTerminationExceptionRootIndex);
Label termination_exception;
- __ Branch(&termination_exception, eq, subject, Operand(a0));
+ __ Branch(&termination_exception, eq, v0, Operand(a0));
- __ Throw(subject); // Expects thrown value in v0.
+ __ Throw(v0); // Expects thrown value in v0.
__ bind(&termination_exception);
__ ThrowUncatchable(TERMINATION, v0); // Expects thrown value in v0.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698