| 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { | 815 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { |
| 816 VisitRR(this, kMips64CvtDUw, node); | 816 VisitRR(this, kMips64CvtDUw, node); |
| 817 } | 817 } |
| 818 | 818 |
| 819 | 819 |
| 820 void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { | 820 void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { |
| 821 VisitRR(this, kMips64TruncWS, node); | 821 VisitRR(this, kMips64TruncWS, node); |
| 822 } | 822 } |
| 823 | 823 |
| 824 | 824 |
| 825 void InstructionSelector::VisitTruncateFloat32ToUint32(Node* node) { |
| 826 UNIMPLEMENTED(); |
| 827 } |
| 828 |
| 829 |
| 825 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { | 830 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
| 826 Mips64OperandGenerator g(this); | 831 Mips64OperandGenerator g(this); |
| 827 Node* value = node->InputAt(0); | 832 Node* value = node->InputAt(0); |
| 828 // Match ChangeFloat64ToInt32(Float64Round##OP) to corresponding instruction | 833 // Match ChangeFloat64ToInt32(Float64Round##OP) to corresponding instruction |
| 829 // which does rounding and conversion to integer format. | 834 // which does rounding and conversion to integer format. |
| 830 if (CanCover(node, value)) { | 835 if (CanCover(node, value)) { |
| 831 switch (value->opcode()) { | 836 switch (value->opcode()) { |
| 832 case IrOpcode::kFloat64RoundDown: | 837 case IrOpcode::kFloat64RoundDown: |
| 833 Emit(kMips64FloorWD, g.DefineAsRegister(node), | 838 Emit(kMips64FloorWD, g.DefineAsRegister(node), |
| 834 g.UseRegister(value->InputAt(0))); | 839 g.UseRegister(value->InputAt(0))); |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 MachineOperatorBuilder::kFloat32RoundUp | | 1874 MachineOperatorBuilder::kFloat32RoundUp | |
| 1870 MachineOperatorBuilder::kFloat64RoundTruncate | | 1875 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1871 MachineOperatorBuilder::kFloat32RoundTruncate | | 1876 MachineOperatorBuilder::kFloat32RoundTruncate | |
| 1872 MachineOperatorBuilder::kFloat64RoundTiesEven | | 1877 MachineOperatorBuilder::kFloat64RoundTiesEven | |
| 1873 MachineOperatorBuilder::kFloat32RoundTiesEven; | 1878 MachineOperatorBuilder::kFloat32RoundTiesEven; |
| 1874 } | 1879 } |
| 1875 | 1880 |
| 1876 } // namespace compiler | 1881 } // namespace compiler |
| 1877 } // namespace internal | 1882 } // namespace internal |
| 1878 } // namespace v8 | 1883 } // namespace v8 |
| OLD | NEW |