Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index 90b42efb364467719cd566b04d0eb46ff30b5b33..2db69ee9fd0953ee2ad5ae8457386886bb471185 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -868,20 +868,10 @@ void ICCompareStub::GenerateGeneric(MacroAssembler* masm) { |
__ IncrementCounter(isolate()->counters()->string_compare_native(), 1, a2, |
a3); |
if (cc == eq) { |
- StringCompareStub::GenerateFlatAsciiStringEquals(masm, |
- lhs, |
- rhs, |
- a2, |
- a3, |
- a4); |
+ StringHelper::GenerateFlatAsciiStringEquals(masm, lhs, rhs, a2, a3, a4); |
} else { |
- StringCompareStub::GenerateCompareFlatAsciiStrings(masm, |
- lhs, |
- rhs, |
- a2, |
- a3, |
- a4, |
- a5); |
+ StringHelper::GenerateCompareFlatAsciiStrings(masm, lhs, rhs, a2, a3, a4, |
+ a5); |
} |
// Never falls through to here. |
@@ -936,7 +926,7 @@ void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
// store the registers in any particular way, but we do have to store and |
// restore them. |
__ MultiPush(kJSCallerSaved | ra.bit()); |
- if (save_doubles_ == kSaveFPRegs) { |
+ if (save_doubles()) { |
__ MultiPushFPU(kCallerSavedFPU); |
} |
const int argument_count = 1; |
@@ -949,7 +939,7 @@ void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
__ CallCFunction( |
ExternalReference::store_buffer_overflow_function(isolate()), |
argument_count); |
- if (save_doubles_ == kSaveFPRegs) { |
+ if (save_doubles()) { |
__ MultiPopFPU(kCallerSavedFPU); |
} |
@@ -3502,12 +3492,11 @@ void SubStringStub::Generate(MacroAssembler* masm) { |
} |
-void StringCompareStub::GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
- Register left, |
- Register right, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3) { |
+void StringHelper::GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
+ Register left, Register right, |
+ Register scratch1, |
+ Register scratch2, |
+ Register scratch3) { |
Register length = scratch1; |
// Compare lengths. |
@@ -3542,13 +3531,9 @@ void StringCompareStub::GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
} |
-void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
- Register left, |
- Register right, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3, |
- Register scratch4) { |
+void StringHelper::GenerateCompareFlatAsciiStrings( |
+ MacroAssembler* masm, Register left, Register right, Register scratch1, |
+ Register scratch2, Register scratch3, Register scratch4) { |
Label result_not_equal, compare_lengths; |
// Find minimum length and length difference. |
__ ld(scratch1, FieldMemOperand(left, String::kLengthOffset)); |
@@ -3587,14 +3572,9 @@ void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
} |
-void StringCompareStub::GenerateAsciiCharsCompareLoop( |
- MacroAssembler* masm, |
- Register left, |
- Register right, |
- Register length, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3, |
+void StringHelper::GenerateAsciiCharsCompareLoop( |
+ MacroAssembler* masm, Register left, Register right, Register length, |
+ Register scratch1, Register scratch2, Register scratch3, |
Label* chars_not_equal) { |
// Change index to run from -length to -1 by adding length to string |
// start. This means that loop ends when index reaches zero, which |
@@ -3648,7 +3628,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { |
// Compare flat ASCII strings natively. Remove arguments from stack first. |
__ IncrementCounter(counters->string_compare_native(), 1, a2, a3); |
__ Daddu(sp, sp, Operand(2 * kPointerSize)); |
- GenerateCompareFlatAsciiStrings(masm, a1, a0, a2, a3, a4, a5); |
+ StringHelper::GenerateCompareFlatAsciiStrings(masm, a1, a0, a2, a3, a4, a5); |
__ bind(&runtime); |
__ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
@@ -3948,11 +3928,11 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) { |
// Compare flat ASCII strings. Returns when done. |
if (equality) { |
- StringCompareStub::GenerateFlatAsciiStringEquals( |
- masm, left, right, tmp1, tmp2, tmp3); |
+ StringHelper::GenerateFlatAsciiStringEquals(masm, left, right, tmp1, tmp2, |
+ tmp3); |
} else { |
- StringCompareStub::GenerateCompareFlatAsciiStrings( |
- masm, left, right, tmp1, tmp2, tmp3, tmp4); |
+ StringHelper::GenerateCompareFlatAsciiStrings(masm, left, right, tmp1, tmp2, |
+ tmp3, tmp4); |
} |
// Handle more complex cases in runtime. |