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/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 | 456 |
457 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } | 457 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } |
458 | 458 |
459 | 459 |
460 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } | 460 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } |
461 | 461 |
462 | 462 |
463 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } | 463 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } |
464 | 464 |
465 | 465 |
466 void InstructionSelector::VisitFloat32Abs(Node* node) { UNREACHABLE(); } | 466 void InstructionSelector::VisitFloat32Abs(Node* node) { |
| 467 VisitRR(this, kMipsAbsS, node); |
| 468 } |
467 | 469 |
468 | 470 |
469 void InstructionSelector::VisitFloat64Abs(Node* node) { UNREACHABLE(); } | 471 void InstructionSelector::VisitFloat64Abs(Node* node) { |
| 472 VisitRR(this, kMipsAbsD, node); |
| 473 } |
470 | 474 |
471 | 475 |
472 void InstructionSelector::VisitFloat32Sqrt(Node* node) { | 476 void InstructionSelector::VisitFloat32Sqrt(Node* node) { |
473 VisitRR(this, kMipsSqrtS, node); | 477 VisitRR(this, kMipsSqrtS, node); |
474 } | 478 } |
475 | 479 |
476 | 480 |
477 void InstructionSelector::VisitFloat64Sqrt(Node* node) { | 481 void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
478 VisitRR(this, kMipsSqrtD, node); | 482 VisitRR(this, kMipsSqrtD, node); |
479 } | 483 } |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 Node* left = node->InputAt(0); | 967 Node* left = node->InputAt(0); |
964 Node* right = node->InputAt(1); | 968 Node* right = node->InputAt(1); |
965 Emit(kMipsFloat64InsertHighWord32, g.DefineSameAsFirst(node), | 969 Emit(kMipsFloat64InsertHighWord32, g.DefineSameAsFirst(node), |
966 g.UseRegister(left), g.UseRegister(right)); | 970 g.UseRegister(left), g.UseRegister(right)); |
967 } | 971 } |
968 | 972 |
969 | 973 |
970 // static | 974 // static |
971 MachineOperatorBuilder::Flags | 975 MachineOperatorBuilder::Flags |
972 InstructionSelector::SupportedMachineOperatorFlags() { | 976 InstructionSelector::SupportedMachineOperatorFlags() { |
| 977 MachineOperatorBuilder::Flags flags = |
| 978 MachineOperatorBuilder::kFloat32Abs | MachineOperatorBuilder::kFloat64Abs; |
| 979 |
973 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 980 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { |
974 return MachineOperatorBuilder::kFloat64RoundDown | | 981 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
975 MachineOperatorBuilder::kFloat64RoundTruncate; | 982 MachineOperatorBuilder::kFloat64RoundTruncate; |
976 } | 983 } |
977 return MachineOperatorBuilder::kNoFlags; | 984 return flags; |
978 } | 985 } |
979 | 986 |
980 } // namespace compiler | 987 } // namespace compiler |
981 } // namespace internal | 988 } // namespace internal |
982 } // namespace v8 | 989 } // namespace v8 |
OLD | NEW |