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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 | 1037 |
1038 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } | 1038 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } |
1039 | 1039 |
1040 | 1040 |
1041 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } | 1041 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } |
1042 | 1042 |
1043 | 1043 |
1044 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } | 1044 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } |
1045 | 1045 |
1046 | 1046 |
| 1047 void InstructionSelector::VisitFloat32Abs(Node* node) { |
| 1048 VisitRR(this, kArmVabsF32, node); |
| 1049 } |
| 1050 |
| 1051 |
| 1052 void InstructionSelector::VisitFloat64Abs(Node* node) { |
| 1053 VisitRR(this, kArmVabsF64, node); |
| 1054 } |
| 1055 |
| 1056 |
1047 void InstructionSelector::VisitFloat32Sqrt(Node* node) { | 1057 void InstructionSelector::VisitFloat32Sqrt(Node* node) { |
1048 VisitRR(this, kArmVsqrtF32, node); | 1058 VisitRR(this, kArmVsqrtF32, node); |
1049 } | 1059 } |
1050 | 1060 |
1051 | 1061 |
1052 void InstructionSelector::VisitFloat64Sqrt(Node* node) { | 1062 void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
1053 VisitRR(this, kArmVsqrtF64, node); | 1063 VisitRR(this, kArmVsqrtF64, node); |
1054 } | 1064 } |
1055 | 1065 |
1056 | 1066 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 } | 1505 } |
1496 Emit(kArmVmovHighF64U32, g.DefineSameAsFirst(node), g.UseRegister(left), | 1506 Emit(kArmVmovHighF64U32, g.DefineSameAsFirst(node), g.UseRegister(left), |
1497 g.UseRegister(right)); | 1507 g.UseRegister(right)); |
1498 } | 1508 } |
1499 | 1509 |
1500 | 1510 |
1501 // static | 1511 // static |
1502 MachineOperatorBuilder::Flags | 1512 MachineOperatorBuilder::Flags |
1503 InstructionSelector::SupportedMachineOperatorFlags() { | 1513 InstructionSelector::SupportedMachineOperatorFlags() { |
1504 MachineOperatorBuilder::Flags flags = | 1514 MachineOperatorBuilder::Flags flags = |
| 1515 MachineOperatorBuilder::kFloat32Abs | |
| 1516 MachineOperatorBuilder::kFloat64Abs | |
1505 MachineOperatorBuilder::kInt32DivIsSafe | | 1517 MachineOperatorBuilder::kInt32DivIsSafe | |
1506 MachineOperatorBuilder::kUint32DivIsSafe; | 1518 MachineOperatorBuilder::kUint32DivIsSafe; |
1507 | 1519 |
1508 if (CpuFeatures::IsSupported(ARMv8)) { | 1520 if (CpuFeatures::IsSupported(ARMv8)) { |
1509 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1521 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1510 MachineOperatorBuilder::kFloat64RoundTruncate | | 1522 MachineOperatorBuilder::kFloat64RoundTruncate | |
1511 MachineOperatorBuilder::kFloat64RoundTiesAway; | 1523 MachineOperatorBuilder::kFloat64RoundTiesAway; |
1512 } | 1524 } |
1513 return flags; | 1525 return flags; |
1514 } | 1526 } |
1515 | 1527 |
1516 } // namespace compiler | 1528 } // namespace compiler |
1517 } // namespace internal | 1529 } // namespace internal |
1518 } // namespace v8 | 1530 } // namespace v8 |
OLD | NEW |