| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/s390/frames-s390.h" | 9 #include "src/s390/frames-s390.h" |
| 10 | 10 |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 } | 1097 } |
| 1098 | 1098 |
| 1099 #if V8_TARGET_ARCH_S390X | 1099 #if V8_TARGET_ARCH_S390X |
| 1100 void InstructionSelector::VisitInt64Mul(Node* node) { | 1100 void InstructionSelector::VisitInt64Mul(Node* node) { |
| 1101 S390OperandGenerator g(this); | 1101 S390OperandGenerator g(this); |
| 1102 Int64BinopMatcher m(node); | 1102 Int64BinopMatcher m(node); |
| 1103 Node* left = m.left().node(); | 1103 Node* left = m.left().node(); |
| 1104 Node* right = m.right().node(); | 1104 Node* right = m.right().node(); |
| 1105 if (g.CanBeImmediate(right, kInt32Imm) && | 1105 if (g.CanBeImmediate(right, kInt32Imm) && |
| 1106 base::bits::IsPowerOfTwo64(g.GetImmediate(right))) { | 1106 base::bits::IsPowerOfTwo64(g.GetImmediate(right))) { |
| 1107 int power = 31 - base::bits::CountLeadingZeros64(g.GetImmediate(right)); | 1107 int power = 63 - base::bits::CountLeadingZeros64(g.GetImmediate(right)); |
| 1108 Emit(kS390_ShiftLeft64, g.DefineSameAsFirst(node), g.UseRegister(left), | 1108 Emit(kS390_ShiftLeft64, g.DefineSameAsFirst(node), g.UseRegister(left), |
| 1109 g.UseImmediate(power)); | 1109 g.UseImmediate(power)); |
| 1110 return; | 1110 return; |
| 1111 } | 1111 } |
| 1112 VisitMul(this, node, kS390_Mul64); | 1112 VisitMul(this, node, kS390_Mul64); |
| 1113 } | 1113 } |
| 1114 #endif | 1114 #endif |
| 1115 | 1115 |
| 1116 void InstructionSelector::VisitInt32MulHigh(Node* node) { | 1116 void InstructionSelector::VisitInt32MulHigh(Node* node) { |
| 1117 S390OperandGenerator g(this); | 1117 S390OperandGenerator g(this); |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2031 // static | 2031 // static |
| 2032 MachineOperatorBuilder::AlignmentRequirements | 2032 MachineOperatorBuilder::AlignmentRequirements |
| 2033 InstructionSelector::AlignmentRequirements() { | 2033 InstructionSelector::AlignmentRequirements() { |
| 2034 return MachineOperatorBuilder::AlignmentRequirements:: | 2034 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2035 FullUnalignedAccessSupport(); | 2035 FullUnalignedAccessSupport(); |
| 2036 } | 2036 } |
| 2037 | 2037 |
| 2038 } // namespace compiler | 2038 } // namespace compiler |
| 2039 } // namespace internal | 2039 } // namespace internal |
| 2040 } // namespace v8 | 2040 } // namespace v8 |
| OLD | NEW |