Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
| 8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 571 VisitWord64Shift(this, node, kX64Ror); | 571 VisitWord64Shift(this, node, kX64Ror); |
| 572 } | 572 } |
| 573 | 573 |
| 574 | 574 |
| 575 void InstructionSelector::VisitWord32Clz(Node* node) { | 575 void InstructionSelector::VisitWord32Clz(Node* node) { |
| 576 X64OperandGenerator g(this); | 576 X64OperandGenerator g(this); |
| 577 Emit(kX64Lzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 577 Emit(kX64Lzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 578 } | 578 } |
| 579 | 579 |
| 580 | 580 |
| 581 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } | |
|
titzer
2015/10/12 23:48:48
Can we go ahead and implement this on at least one
| |
| 582 | |
| 583 | |
| 581 void InstructionSelector::VisitInt32Add(Node* node) { | 584 void InstructionSelector::VisitInt32Add(Node* node) { |
| 582 X64OperandGenerator g(this); | 585 X64OperandGenerator g(this); |
| 583 | 586 |
| 584 // Try to match the Add to a leal pattern | 587 // Try to match the Add to a leal pattern |
| 585 BaseWithIndexAndDisplacement32Matcher m(node); | 588 BaseWithIndexAndDisplacement32Matcher m(node); |
| 586 if (m.matches() && | 589 if (m.matches() && |
| 587 (m.displacement() == NULL || g.CanBeImmediate(m.displacement()))) { | 590 (m.displacement() == NULL || g.CanBeImmediate(m.displacement()))) { |
| 588 EmitLea(this, kX64Lea32, node, m.index(), m.scale(), m.base(), | 591 EmitLea(this, kX64Lea32, node, m.index(), m.scale(), m.base(), |
| 589 m.displacement()); | 592 m.displacement()); |
| 590 return; | 593 return; |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1708 if (CpuFeatures::IsSupported(SSE4_1)) { | 1711 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 1709 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1712 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1710 MachineOperatorBuilder::kFloat64RoundTruncate; | 1713 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 1711 } | 1714 } |
| 1712 return flags; | 1715 return flags; |
| 1713 } | 1716 } |
| 1714 | 1717 |
| 1715 } // namespace compiler | 1718 } // namespace compiler |
| 1716 } // namespace internal | 1719 } // namespace internal |
| 1717 } // namespace v8 | 1720 } // namespace v8 |
| OLD | NEW |