Commit 65daf10c authored by yangguo@chromium.org's avatar yangguo@chromium.org

MIPS: Fix implementation of string slices.

Bug on mips using at register innapropriately, use different reg as temp.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7794020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 42388ad5
...@@ -4527,9 +4527,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { ...@@ -4527,9 +4527,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ lw(a0, FieldMemOperand(subject, HeapObject::kMapOffset)); __ lw(a0, FieldMemOperand(subject, HeapObject::kMapOffset));
__ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset));
// First check for flat string. // First check for flat string.
__ And(at, a0, Operand(kIsNotStringMask | kStringRepresentationMask)); __ And(a1, a0, Operand(kIsNotStringMask | kStringRepresentationMask));
STATIC_ASSERT((kStringTag | kSeqStringTag) == 0); STATIC_ASSERT((kStringTag | kSeqStringTag) == 0);
__ Branch(&seq_string, eq, at, Operand(zero_reg)); __ Branch(&seq_string, eq, a1, Operand(zero_reg));
// subject: Subject string // subject: Subject string
// a0: instance type if Subject string // a0: instance type if Subject string
...@@ -4543,8 +4543,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { ...@@ -4543,8 +4543,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
Label cons_string, check_encoding; Label cons_string, check_encoding;
STATIC_ASSERT(kConsStringTag < kExternalStringTag); STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag); STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ Branch(&cons_string, lt, at, Operand(kExternalStringTag)); __ Branch(&cons_string, lt, a1, Operand(kExternalStringTag));
__ Branch(&runtime, eq, at, Operand(kExternalStringTag)); __ Branch(&runtime, eq, a1, Operand(kExternalStringTag));
// String is sliced. // String is sliced.
__ lw(t0, FieldMemOperand(subject, SlicedString::kOffsetOffset)); __ lw(t0, FieldMemOperand(subject, SlicedString::kOffsetOffset));
......
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