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

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

Issue 1517243004: MIPS: [turbofan] Fixed Div operations by zero on r6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3eaaed8081594a522cfa57e7907f81a0e90f4d46..aee85d9583ee336e234b5316bff2fa0b7e1dd235 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -648,7 +648,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kMipsDiv:
__ Div(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
if (IsMipsArchVariant(kMips32r6)) {
- __ selnez(i.OutputRegister(), i.InputRegister(1), i.InputRegister(0));
+ __ selnez(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
__ Movz(i.OutputRegister(), i.InputRegister(1), i.InputRegister(1));
}
@@ -656,7 +656,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kMipsDivU:
__ Divu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
if (IsMipsArchVariant(kMips32r6)) {
- __ selnez(i.OutputRegister(), i.InputRegister(1), i.InputRegister(0));
+ __ selnez(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
__ Movz(i.OutputRegister(), i.InputRegister(1), i.InputRegister(1));
}
« no previous file with comments | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698