| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { | 384 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
| 385 VisitRR(this, kMipsTruncUwD, node); | 385 VisitRR(this, kMipsTruncUwD, node); |
| 386 } | 386 } |
| 387 | 387 |
| 388 | 388 |
| 389 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { | 389 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { |
| 390 VisitRR(this, kMipsCvtSD, node); | 390 VisitRR(this, kMipsCvtSD, node); |
| 391 } | 391 } |
| 392 | 392 |
| 393 | 393 |
| 394 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { |
| 395 switch (TruncationModeOf(node->op())) { |
| 396 case TruncationMode::kJavaScript: |
| 397 return VisitRR(this, kArchTruncateDoubleToI, node); |
| 398 case TruncationMode::kRoundToZero: |
| 399 return VisitRR(this, kMipsTruncWD, node); |
| 400 } |
| 401 UNREACHABLE(); |
| 402 } |
| 403 |
| 404 |
| 394 void InstructionSelector::VisitFloat32Add(Node* node) { | 405 void InstructionSelector::VisitFloat32Add(Node* node) { |
| 395 VisitRRR(this, kMipsAddS, node); | 406 VisitRRR(this, kMipsAddS, node); |
| 396 } | 407 } |
| 397 | 408 |
| 398 | 409 |
| 399 void InstructionSelector::VisitFloat64Add(Node* node) { | 410 void InstructionSelector::VisitFloat64Add(Node* node) { |
| 400 VisitRRR(this, kMipsAddD, node); | 411 VisitRRR(this, kMipsAddD, node); |
| 401 } | 412 } |
| 402 | 413 |
| 403 | 414 |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 IsFp64Mode()) { | 1094 IsFp64Mode()) { |
| 1084 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1095 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1085 MachineOperatorBuilder::kFloat64RoundTruncate; | 1096 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 1086 } | 1097 } |
| 1087 return flags; | 1098 return flags; |
| 1088 } | 1099 } |
| 1089 | 1100 |
| 1090 } // namespace compiler | 1101 } // namespace compiler |
| 1091 } // namespace internal | 1102 } // namespace internal |
| 1092 } // namespace v8 | 1103 } // namespace v8 |
| OLD | NEW |