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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 594 |
595 | 595 |
596 void InstructionSelector::VisitFloat64Mod(Node* node) { | 596 void InstructionSelector::VisitFloat64Mod(Node* node) { |
597 Mips64OperandGenerator g(this); | 597 Mips64OperandGenerator g(this); |
598 Emit(kMips64ModD, g.DefineAsFixed(node, f0), | 598 Emit(kMips64ModD, g.DefineAsFixed(node, f0), |
599 g.UseFixed(node->InputAt(0), f12), | 599 g.UseFixed(node->InputAt(0), f12), |
600 g.UseFixed(node->InputAt(1), f14))->MarkAsCall(); | 600 g.UseFixed(node->InputAt(1), f14))->MarkAsCall(); |
601 } | 601 } |
602 | 602 |
603 | 603 |
604 void InstructionSelector::VisitFloat32Max(Node* node) { | 604 void InstructionSelector::VisitFloat32Max(Node* node) { UNREACHABLE(); } |
605 DCHECK(kArchVariant == kMips64r6); | |
606 VisitRRR(this, kMips64MaxS, node); | |
607 } | |
608 | 605 |
609 | 606 |
610 void InstructionSelector::VisitFloat64Max(Node* node) { | 607 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } |
611 DCHECK(kArchVariant == kMips64r6); | |
612 VisitRRR(this, kMips64MaxD, node); | |
613 } | |
614 | 608 |
615 | 609 |
616 void InstructionSelector::VisitFloat32Min(Node* node) { | 610 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } |
617 DCHECK(kArchVariant == kMips64r6); | |
618 VisitRRR(this, kMips64MinS, node); | |
619 } | |
620 | 611 |
621 | 612 |
622 void InstructionSelector::VisitFloat64Min(Node* node) { | 613 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } |
623 DCHECK(kArchVariant == kMips64r6); | |
624 VisitRRR(this, kMips64MinD, node); | |
625 } | |
626 | 614 |
627 | 615 |
628 void InstructionSelector::VisitFloat32Abs(Node* node) { | 616 void InstructionSelector::VisitFloat32Abs(Node* node) { |
629 VisitRR(this, kMips64AbsS, node); | 617 VisitRR(this, kMips64AbsS, node); |
630 } | 618 } |
631 | 619 |
632 | 620 |
633 void InstructionSelector::VisitFloat64Abs(Node* node) { | 621 void InstructionSelector::VisitFloat64Abs(Node* node) { |
634 VisitRR(this, kMips64AbsD, node); | 622 VisitRR(this, kMips64AbsD, node); |
635 } | 623 } |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 Node* left = node->InputAt(0); | 1288 Node* left = node->InputAt(0); |
1301 Node* right = node->InputAt(1); | 1289 Node* right = node->InputAt(1); |
1302 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node), | 1290 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node), |
1303 g.UseRegister(left), g.UseRegister(right)); | 1291 g.UseRegister(left), g.UseRegister(right)); |
1304 } | 1292 } |
1305 | 1293 |
1306 | 1294 |
1307 // static | 1295 // static |
1308 MachineOperatorBuilder::Flags | 1296 MachineOperatorBuilder::Flags |
1309 InstructionSelector::SupportedMachineOperatorFlags() { | 1297 InstructionSelector::SupportedMachineOperatorFlags() { |
1310 MachineOperatorBuilder::Flags flags = | 1298 return MachineOperatorBuilder::kFloat64RoundDown | |
1311 MachineOperatorBuilder::kFloat64RoundDown | | 1299 MachineOperatorBuilder::kFloat64RoundTruncate; |
1312 MachineOperatorBuilder::kFloat64RoundTruncate; | |
1313 if (kArchVariant == kMips64r6) { | |
1314 flags |= MachineOperatorBuilder::kFloat32Max | | |
1315 MachineOperatorBuilder::kFloat32Min | | |
1316 MachineOperatorBuilder::kFloat64Max | | |
1317 MachineOperatorBuilder::kFloat64Min; | |
1318 } | |
1319 return flags; | |
1320 } | 1300 } |
1321 | 1301 |
1322 } // namespace compiler | 1302 } // namespace compiler |
1323 } // namespace internal | 1303 } // namespace internal |
1324 } // namespace v8 | 1304 } // namespace v8 |
OLD | NEW |