Index: src/compiler/mips64/code-generator-mips64.cc |
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc |
index 053952cb8756f000982cf63ca1d196d215cf8c22..a52359d120aeb762b58c59c8e8aba6691b12de35 100644 |
--- a/src/compiler/mips64/code-generator-mips64.cc |
+++ b/src/compiler/mips64/code-generator-mips64.cc |
@@ -1180,9 +1180,10 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, |
DCHECK(instr->arch_opcode() == kMips64CmpS); |
__ cmp(cc, W, kDoubleCompareReg, left, right); |
} |
- __ dmfc1(at, kDoubleCompareReg); |
- __ dsrl32(result, at, 31); // Cmp returns all 1s for true. |
- if (!predicate) // Toggle result for not equal. |
+ __ dmfc1(result, kDoubleCompareReg); |
+ __ andi(result, result, 1); // Cmp returns all 1's/0's, use only LSB. |
ivica.bogosavljevic
2015/10/26 09:45:51
That's the thing we need :)
|
+ |
+ if (!predicate) // Toggle result for not equal. |
__ xori(result, result, 1); |
} |
return; |