| Index: src/mips64/code-stubs-mips64.cc
|
| diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
|
| index 6205e98cddf53c2ee3237cfb79d7ddc5f9d0bdaa..f8b34cbd608b855103209db48ba28d7a8ba03a14 100644
|
| --- a/src/mips64/code-stubs-mips64.cc
|
| +++ b/src/mips64/code-stubs-mips64.cc
|
| @@ -1016,17 +1016,28 @@ void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
|
|
|
| // Check if LESS condition is satisfied. If true, move conditionally
|
| // result to v0.
|
| - __ c(OLT, D, f12, f14);
|
| - __ Movt(v0, a4);
|
| - // Use previous check to store conditionally to v0 oposite condition
|
| - // (GREATER). If rhs is equal to lhs, this will be corrected in next
|
| - // check.
|
| - __ Movf(v0, a5);
|
| - // Check if EQUAL condition is satisfied. If true, move conditionally
|
| - // result to v0.
|
| - __ c(EQ, D, f12, f14);
|
| - __ Movt(v0, a6);
|
| + if (kArchVariant != kMips64r6) {
|
| + __ c(OLT, D, f12, f14);
|
| + __ Movt(v0, a4);
|
| + // Use previous check to store conditionally to v0 oposite condition
|
| + // (GREATER). If rhs is equal to lhs, this will be corrected in next
|
| + // check.
|
| + __ Movf(v0, a5);
|
| + // Check if EQUAL condition is satisfied. If true, move conditionally
|
| + // result to v0.
|
| + __ c(EQ, D, f12, f14);
|
| + __ Movt(v0, a6);
|
| + } else {
|
| + Label skip;
|
| + __ BranchF(USE_DELAY_SLOT, &skip, NULL, lt, f12, f14);
|
| + __ mov(v0, a4); // Return LESS as result.
|
|
|
| + __ BranchF(USE_DELAY_SLOT, &skip, NULL, eq, f12, f14);
|
| + __ mov(v0, a6); // Return EQUAL as result.
|
| +
|
| + __ mov(v0, a5); // Return GREATER as result.
|
| + __ bind(&skip);
|
| + }
|
| __ Ret();
|
|
|
| __ bind(&nan);
|
|
|