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

Unified Diff: src/compiler/mips/code-generator-mips.cc

Issue 1425603002: MIPS64: Fix r6 boolean materializations after a float32 compare. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips32 change, for consistency (no bug on mips32r6) Created 5 years, 2 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
Index: src/compiler/mips/code-generator-mips.cc
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
index f4905c9f72ce4a7c1f4acdfab1f3e4397b2725b9..a581ca5c3ae02a6eaa946e3d9258b2aff81a1739 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -1101,8 +1101,8 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr,
DCHECK(instr->arch_opcode() == kMipsCmpS);
__ cmp(cc, W, kDoubleCompareReg, left, right);
}
- __ mfc1(at, kDoubleCompareReg);
- __ srl(result, at, 31); // Cmp returns all 1s for true.
+ __ mfc1(result, kDoubleCompareReg);
+ __ andi(result, result, 1); // Cmp returns all 1's/0's, use only LSB.
if (!predicate) // Toggle result for not equal.
__ xori(result, result, 1);
}
« no previous file with comments | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | src/compiler/mips64/code-generator-mips64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698