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 "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 | 10 |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 void InstructionSelector::VisitWord32Ror(Node* node) { | 555 void InstructionSelector::VisitWord32Ror(Node* node) { |
556 VisitRRO(this, kMips64Ror, node); | 556 VisitRRO(this, kMips64Ror, node); |
557 } | 557 } |
558 | 558 |
559 | 559 |
560 void InstructionSelector::VisitWord32Clz(Node* node) { | 560 void InstructionSelector::VisitWord32Clz(Node* node) { |
561 VisitRR(this, kMips64Clz, node); | 561 VisitRR(this, kMips64Clz, node); |
562 } | 562 } |
563 | 563 |
564 | 564 |
565 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } | 565 void InstructionSelector::VisitWord32Ctz(Node* node) { |
| 566 Mips64OperandGenerator g(this); |
| 567 Emit(kMips64Ctz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
| 568 } |
566 | 569 |
567 | 570 |
568 void InstructionSelector::VisitWord64Ctz(Node* node) { UNREACHABLE(); } | 571 void InstructionSelector::VisitWord64Ctz(Node* node) { |
| 572 Mips64OperandGenerator g(this); |
| 573 Emit(kMips64Dctz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
| 574 } |
569 | 575 |
570 | 576 |
571 void InstructionSelector::VisitWord32Popcnt(Node* node) { UNREACHABLE(); } | 577 void InstructionSelector::VisitWord32Popcnt(Node* node) { |
| 578 Mips64OperandGenerator g(this); |
| 579 Emit(kMips64Popcnt, g.DefineAsRegister(node), |
| 580 g.UseRegister(node->InputAt(0))); |
| 581 } |
572 | 582 |
573 | 583 |
574 void InstructionSelector::VisitWord64Popcnt(Node* node) { UNREACHABLE(); } | 584 void InstructionSelector::VisitWord64Popcnt(Node* node) { |
| 585 Mips64OperandGenerator g(this); |
| 586 Emit(kMips64Dpopcnt, g.DefineAsRegister(node), |
| 587 g.UseRegister(node->InputAt(0))); |
| 588 } |
575 | 589 |
576 | 590 |
577 void InstructionSelector::VisitWord64Ror(Node* node) { | 591 void InstructionSelector::VisitWord64Ror(Node* node) { |
578 VisitRRO(this, kMips64Dror, node); | 592 VisitRRO(this, kMips64Dror, node); |
579 } | 593 } |
580 | 594 |
581 | 595 |
582 void InstructionSelector::VisitWord64Clz(Node* node) { | 596 void InstructionSelector::VisitWord64Clz(Node* node) { |
583 VisitRR(this, kMips64Dclz, node); | 597 VisitRR(this, kMips64Dclz, node); |
584 } | 598 } |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 Node* left = node->InputAt(0); | 1853 Node* left = node->InputAt(0); |
1840 Node* right = node->InputAt(1); | 1854 Node* right = node->InputAt(1); |
1841 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node), | 1855 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node), |
1842 g.UseRegister(left), g.UseRegister(right)); | 1856 g.UseRegister(left), g.UseRegister(right)); |
1843 } | 1857 } |
1844 | 1858 |
1845 | 1859 |
1846 // static | 1860 // static |
1847 MachineOperatorBuilder::Flags | 1861 MachineOperatorBuilder::Flags |
1848 InstructionSelector::SupportedMachineOperatorFlags() { | 1862 InstructionSelector::SupportedMachineOperatorFlags() { |
1849 return MachineOperatorBuilder::kWord32ShiftIsSafe | | 1863 return MachineOperatorBuilder::kWord32Ctz | |
| 1864 MachineOperatorBuilder::kWord64Ctz | |
| 1865 MachineOperatorBuilder::kWord32Popcnt | |
| 1866 MachineOperatorBuilder::kWord64Popcnt | |
| 1867 MachineOperatorBuilder::kWord32ShiftIsSafe | |
1850 MachineOperatorBuilder::kInt32DivIsSafe | | 1868 MachineOperatorBuilder::kInt32DivIsSafe | |
1851 MachineOperatorBuilder::kUint32DivIsSafe | | 1869 MachineOperatorBuilder::kUint32DivIsSafe | |
1852 MachineOperatorBuilder::kFloat64Min | | 1870 MachineOperatorBuilder::kFloat64Min | |
1853 MachineOperatorBuilder::kFloat64Max | | 1871 MachineOperatorBuilder::kFloat64Max | |
1854 MachineOperatorBuilder::kFloat32Min | | 1872 MachineOperatorBuilder::kFloat32Min | |
1855 MachineOperatorBuilder::kFloat32Max | | 1873 MachineOperatorBuilder::kFloat32Max | |
1856 MachineOperatorBuilder::kFloat64RoundDown | | 1874 MachineOperatorBuilder::kFloat64RoundDown | |
1857 MachineOperatorBuilder::kFloat32RoundDown | | 1875 MachineOperatorBuilder::kFloat32RoundDown | |
1858 MachineOperatorBuilder::kFloat64RoundUp | | 1876 MachineOperatorBuilder::kFloat64RoundUp | |
1859 MachineOperatorBuilder::kFloat32RoundUp | | 1877 MachineOperatorBuilder::kFloat32RoundUp | |
1860 MachineOperatorBuilder::kFloat64RoundTruncate | | 1878 MachineOperatorBuilder::kFloat64RoundTruncate | |
1861 MachineOperatorBuilder::kFloat32RoundTruncate | | 1879 MachineOperatorBuilder::kFloat32RoundTruncate | |
1862 MachineOperatorBuilder::kFloat64RoundTiesEven | | 1880 MachineOperatorBuilder::kFloat64RoundTiesEven | |
1863 MachineOperatorBuilder::kFloat32RoundTiesEven; | 1881 MachineOperatorBuilder::kFloat32RoundTiesEven; |
1864 } | 1882 } |
1865 | 1883 |
1866 } // namespace compiler | 1884 } // namespace compiler |
1867 } // namespace internal | 1885 } // namespace internal |
1868 } // namespace v8 | 1886 } // namespace v8 |
OLD | NEW |