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

Unified Diff: src/mips/lithium-codegen-mips.cc

Issue 1187063002: MIPS: Fix for Remove unsafe EmitLoadRegister usage in AddI/SubI for constant right operand. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Specify scratch reg to Overflow macros, to avoid 'at' reg conflict. Created 5 years, 6 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
« no previous file with comments | « no previous file | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
index 3f8470de48a2442678ebfaf29925b5e796439a67..ccf0e5346e0ab533d32e5faf62ad793f786e2b06 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -1681,8 +1681,7 @@ void LCodeGen::DoSubI(LSubI* instr) {
} else {
DCHECK(right->IsRegister() || right->IsConstantOperand());
__ SubuAndCheckForOverflow(ToRegister(result), ToRegister(left),
- ToOperand(right),
- overflow); // Reg at also used as scratch.
+ ToOperand(right), overflow, scratch);
}
DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, overflow,
Operand(zero_reg));
@@ -1878,8 +1877,7 @@ void LCodeGen::DoAddI(LAddI* instr) {
} else {
DCHECK(right->IsRegister() || right->IsConstantOperand());
__ AdduAndCheckForOverflow(ToRegister(result), ToRegister(left),
- ToOperand(right),
- overflow); // Reg at also used as scratch.
+ ToOperand(right), overflow, scratch);
}
DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, overflow,
Operand(zero_reg));
« no previous file with comments | « no previous file | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698