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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 void InstructionSelector::VisitWord32Ror(Node* node) { | 565 void InstructionSelector::VisitWord32Ror(Node* node) { |
566 VisitWord32Shift(this, node, kX64Ror32); | 566 VisitWord32Shift(this, node, kX64Ror32); |
567 } | 567 } |
568 | 568 |
569 | 569 |
570 void InstructionSelector::VisitWord64Ror(Node* node) { | 570 void InstructionSelector::VisitWord64Ror(Node* node) { |
571 VisitWord64Shift(this, node, kX64Ror); | 571 VisitWord64Shift(this, node, kX64Ror); |
572 } | 572 } |
573 | 573 |
574 | 574 |
| 575 void InstructionSelector::VisitWord64Clz(Node* node) { |
| 576 X64OperandGenerator g(this); |
| 577 Emit(kX64Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 578 } |
| 579 |
| 580 |
575 void InstructionSelector::VisitWord32Clz(Node* node) { | 581 void InstructionSelector::VisitWord32Clz(Node* node) { |
576 X64OperandGenerator g(this); | 582 X64OperandGenerator g(this); |
577 Emit(kX64Lzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 583 Emit(kX64Lzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
578 } | 584 } |
579 | 585 |
580 | 586 |
581 void InstructionSelector::VisitWord32Ctz(Node* node) { | 587 void InstructionSelector::VisitWord32Ctz(Node* node) { |
582 X64OperandGenerator g(this); | 588 X64OperandGenerator g(this); |
583 Emit(kX64Tzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 589 Emit(kX64Tzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
584 } | 590 } |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1607 if (CpuFeatures::IsSupported(SSE4_1)) { | 1613 if (CpuFeatures::IsSupported(SSE4_1)) { |
1608 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1614 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1609 MachineOperatorBuilder::kFloat64RoundTruncate; | 1615 MachineOperatorBuilder::kFloat64RoundTruncate; |
1610 } | 1616 } |
1611 return flags; | 1617 return flags; |
1612 } | 1618 } |
1613 | 1619 |
1614 } // namespace compiler | 1620 } // namespace compiler |
1615 } // namespace internal | 1621 } // namespace internal |
1616 } // namespace v8 | 1622 } // namespace v8 |
OLD | NEW |