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

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

Issue 2029273002: PPC: Sign-extended result in DoFlooringDivI/DoDivI on 64bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | no next file » | 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 37a121c1dad201508bac8ce89ece5e3a83d7a568..8ab30ff8bbdd69dc7393d6806b5b1e19623aaeea 100644
--- a/src/crankshaft/ppc/lithium-codegen-ppc.cc
+++ b/src/crankshaft/ppc/lithium-codegen-ppc.cc
@@ -1140,6 +1140,10 @@ void LCodeGen::DoDivI(LDivI* instr) {
}
}
+#if V8_TARGET_ARCH_PPC64
+ __ extsw(result, result);
+#endif
+
if (!hdiv->CheckFlag(HInstruction::kAllUsesTruncatingToInt32)) {
// Deoptimize if remainder is not 0.
Register scratch = scratch0();
@@ -1333,6 +1337,9 @@ void LCodeGen::DoFlooringDivI(LFlooringDivI* instr) {
// We performed a truncating division. Correct the result.
__ subi(result, result, Operand(1));
__ bind(&done);
+#if V8_TARGET_ARCH_PPC64
+ __ extsw(result, result);
+#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698