| 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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 // instruction. | 1087 // instruction. |
| 1088 if (CanCover(node, value) && | 1088 if (CanCover(node, value) && |
| 1089 value->opcode() == IrOpcode::kChangeInt32ToFloat64) { | 1089 value->opcode() == IrOpcode::kChangeInt32ToFloat64) { |
| 1090 Emit(kMips64CvtSW, g.DefineAsRegister(node), | 1090 Emit(kMips64CvtSW, g.DefineAsRegister(node), |
| 1091 g.UseRegister(value->InputAt(0))); | 1091 g.UseRegister(value->InputAt(0))); |
| 1092 return; | 1092 return; |
| 1093 } | 1093 } |
| 1094 VisitRR(this, kMips64CvtSD, node); | 1094 VisitRR(this, kMips64CvtSD, node); |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 | 1097 void InstructionSelector::VisitTruncateFloat64ToWord32(Node* node) { |
| 1098 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { | 1098 VisitRR(this, kArchTruncateDoubleToI, node); |
| 1099 switch (TruncationModeOf(node->op())) { | |
| 1100 case TruncationMode::kJavaScript: | |
| 1101 return VisitRR(this, kArchTruncateDoubleToI, node); | |
| 1102 case TruncationMode::kRoundToZero: | |
| 1103 return VisitRR(this, kMips64TruncWD, node); | |
| 1104 } | |
| 1105 UNREACHABLE(); | |
| 1106 } | 1099 } |
| 1107 | 1100 |
| 1101 void InstructionSelector::VisitRoundFloat64ToInt32(Node* node) { |
| 1102 VisitRR(this, kMips64TruncWD, node); |
| 1103 } |
| 1108 | 1104 |
| 1109 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) { | 1105 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) { |
| 1110 VisitRR(this, kMips64CvtSL, node); | 1106 VisitRR(this, kMips64CvtSL, node); |
| 1111 } | 1107 } |
| 1112 | 1108 |
| 1113 | 1109 |
| 1114 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) { | 1110 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) { |
| 1115 VisitRR(this, kMips64CvtDL, node); | 1111 VisitRR(this, kMips64CvtDL, node); |
| 1116 } | 1112 } |
| 1117 | 1113 |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 MachineOperatorBuilder::kFloat32RoundUp | | 2012 MachineOperatorBuilder::kFloat32RoundUp | |
| 2017 MachineOperatorBuilder::kFloat64RoundTruncate | | 2013 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 2018 MachineOperatorBuilder::kFloat32RoundTruncate | | 2014 MachineOperatorBuilder::kFloat32RoundTruncate | |
| 2019 MachineOperatorBuilder::kFloat64RoundTiesEven | | 2015 MachineOperatorBuilder::kFloat64RoundTiesEven | |
| 2020 MachineOperatorBuilder::kFloat32RoundTiesEven; | 2016 MachineOperatorBuilder::kFloat32RoundTiesEven; |
| 2021 } | 2017 } |
| 2022 | 2018 |
| 2023 } // namespace compiler | 2019 } // namespace compiler |
| 2024 } // namespace internal | 2020 } // namespace internal |
| 2025 } // namespace v8 | 2021 } // namespace v8 |
| OLD | NEW |