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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 switch (TruncationModeOf(node->op())) { | 395 switch (TruncationModeOf(node->op())) { |
396 case TruncationMode::kJavaScript: | 396 case TruncationMode::kJavaScript: |
397 return VisitRR(this, kArchTruncateDoubleToI, node); | 397 return VisitRR(this, kArchTruncateDoubleToI, node); |
398 case TruncationMode::kRoundToZero: | 398 case TruncationMode::kRoundToZero: |
399 return VisitRR(this, kMipsTruncWD, node); | 399 return VisitRR(this, kMipsTruncWD, node); |
400 } | 400 } |
401 UNREACHABLE(); | 401 UNREACHABLE(); |
402 } | 402 } |
403 | 403 |
404 | 404 |
| 405 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { |
| 406 VisitRR(this, kMipsFloat64ExtractLowWord32, node); |
| 407 } |
| 408 |
| 409 |
| 410 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { |
| 411 MipsOperandGenerator g(this); |
| 412 Emit(kMipsFloat64InsertLowWord32, g.DefineAsRegister(node), |
| 413 ImmediateOperand(ImmediateOperand::INLINE, 0), |
| 414 g.UseRegister(node->InputAt(0))); |
| 415 } |
| 416 |
| 417 |
405 void InstructionSelector::VisitFloat32Add(Node* node) { | 418 void InstructionSelector::VisitFloat32Add(Node* node) { |
406 VisitRRR(this, kMipsAddS, node); | 419 VisitRRR(this, kMipsAddS, node); |
407 } | 420 } |
408 | 421 |
409 | 422 |
410 void InstructionSelector::VisitFloat64Add(Node* node) { | 423 void InstructionSelector::VisitFloat64Add(Node* node) { |
411 VisitRRR(this, kMipsAddD, node); | 424 VisitRRR(this, kMipsAddD, node); |
412 } | 425 } |
413 | 426 |
414 | 427 |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 IsFp64Mode()) { | 1126 IsFp64Mode()) { |
1114 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1127 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1115 MachineOperatorBuilder::kFloat64RoundTruncate; | 1128 MachineOperatorBuilder::kFloat64RoundTruncate; |
1116 } | 1129 } |
1117 return flags; | 1130 return flags; |
1118 } | 1131 } |
1119 | 1132 |
1120 } // namespace compiler | 1133 } // namespace compiler |
1121 } // namespace internal | 1134 } // namespace internal |
1122 } // namespace v8 | 1135 } // namespace v8 |
OLD | NEW |