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

Unified Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 2639853002: PPC/s390: Check for overflow when SubI IntMin (Closed)
Patch Set: addressed comments Created 3 years, 11 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/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/ppc/lithium-codegen-ppc.cc
diff --git a/src/crankshaft/ppc/lithium-codegen-ppc.cc b/src/crankshaft/ppc/lithium-codegen-ppc.cc
index ddacd2badf15026fd85c6fb9ce88781bd882522a..96debd9d24b0158a37a9f6ae04c654742e7f25e0 100644
--- a/src/crankshaft/ppc/lithium-codegen-ppc.cc
+++ b/src/crankshaft/ppc/lithium-codegen-ppc.cc
@@ -1707,12 +1707,15 @@ void LCodeGen::DoSubI(LSubI* instr) {
} else {
__ sub(result, left, EmitLoadRegister(right, ip));
}
-#if V8_TARGET_ARCH_PPC64
if (can_overflow) {
+#if V8_TARGET_ARCH_PPC64
__ TestIfInt32(result, r0);
+#else
+ __ TestIfInt32(scratch0(), result, r0);
+#endif
DeoptimizeIf(ne, instr, DeoptimizeReason::kOverflow);
}
-#endif
+
} else {
if (right->IsConstantOperand()) {
__ AddAndCheckForOverflow(result, left, -(ToOperand(right).immediate()),
« no previous file with comments | « no previous file | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698