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

Unified Diff: src/compiler/s390/instruction-selector-s390.cc

Issue 2321973006: s390: Fixed error in calculating the power of 2 in Int64Mul (Closed)
Patch Set: Created 4 years, 3 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/compiler/s390/instruction-selector-s390.cc
diff --git a/src/compiler/s390/instruction-selector-s390.cc b/src/compiler/s390/instruction-selector-s390.cc
index 80c6fd048f07319a9f62400428a746d740a15265..f1aa332a493ce44e0fc8aaa4d9598ec3cc8e26b6 100644
--- a/src/compiler/s390/instruction-selector-s390.cc
+++ b/src/compiler/s390/instruction-selector-s390.cc
@@ -1104,7 +1104,7 @@ void InstructionSelector::VisitInt64Mul(Node* node) {
Node* right = m.right().node();
if (g.CanBeImmediate(right, kInt32Imm) &&
base::bits::IsPowerOfTwo64(g.GetImmediate(right))) {
- int power = 31 - base::bits::CountLeadingZeros64(g.GetImmediate(right));
+ int power = 63 - base::bits::CountLeadingZeros64(g.GetImmediate(right));
Emit(kS390_ShiftLeft64, g.DefineSameAsFirst(node), g.UseRegister(left),
g.UseImmediate(power));
return;
« 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