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/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 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 | 1583 |
1584 | 1584 |
1585 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { | 1585 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { |
1586 X87OperandGenerator g(this); | 1586 X87OperandGenerator g(this); |
1587 Node* left = node->InputAt(0); | 1587 Node* left = node->InputAt(0); |
1588 Node* right = node->InputAt(1); | 1588 Node* right = node->InputAt(1); |
1589 Emit(kX87Float64InsertHighWord32, g.UseFixed(node, stX_0), | 1589 Emit(kX87Float64InsertHighWord32, g.UseFixed(node, stX_0), |
1590 g.UseRegister(left), g.UseRegister(right)); | 1590 g.UseRegister(left), g.UseRegister(right)); |
1591 } | 1591 } |
1592 | 1592 |
| 1593 void InstructionSelector::VisitAtomicLoad(Node* node) { |
| 1594 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
| 1595 DCHECK(load_rep.representation() == MachineRepresentation::kWord8 || |
| 1596 load_rep.representation() == MachineRepresentation::kWord16 || |
| 1597 load_rep.representation() == MachineRepresentation::kWord32); |
| 1598 USE(load_rep); |
| 1599 VisitLoad(node); |
| 1600 } |
1593 | 1601 |
1594 // static | 1602 // static |
1595 MachineOperatorBuilder::Flags | 1603 MachineOperatorBuilder::Flags |
1596 InstructionSelector::SupportedMachineOperatorFlags() { | 1604 InstructionSelector::SupportedMachineOperatorFlags() { |
1597 MachineOperatorBuilder::Flags flags = | 1605 MachineOperatorBuilder::Flags flags = |
1598 MachineOperatorBuilder::kFloat32Max | | 1606 MachineOperatorBuilder::kFloat32Max | |
1599 MachineOperatorBuilder::kFloat32Min | | 1607 MachineOperatorBuilder::kFloat32Min | |
1600 MachineOperatorBuilder::kFloat64Max | | 1608 MachineOperatorBuilder::kFloat64Max | |
1601 MachineOperatorBuilder::kFloat64Min | | 1609 MachineOperatorBuilder::kFloat64Min | |
1602 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1610 MachineOperatorBuilder::kWord32ShiftIsSafe; |
1603 if (CpuFeatures::IsSupported(POPCNT)) { | 1611 if (CpuFeatures::IsSupported(POPCNT)) { |
1604 flags |= MachineOperatorBuilder::kWord32Popcnt; | 1612 flags |= MachineOperatorBuilder::kWord32Popcnt; |
1605 } | 1613 } |
1606 | 1614 |
1607 flags |= MachineOperatorBuilder::kFloat32RoundDown | | 1615 flags |= MachineOperatorBuilder::kFloat32RoundDown | |
1608 MachineOperatorBuilder::kFloat64RoundDown | | 1616 MachineOperatorBuilder::kFloat64RoundDown | |
1609 MachineOperatorBuilder::kFloat32RoundUp | | 1617 MachineOperatorBuilder::kFloat32RoundUp | |
1610 MachineOperatorBuilder::kFloat64RoundUp | | 1618 MachineOperatorBuilder::kFloat64RoundUp | |
1611 MachineOperatorBuilder::kFloat32RoundTruncate | | 1619 MachineOperatorBuilder::kFloat32RoundTruncate | |
1612 MachineOperatorBuilder::kFloat64RoundTruncate | | 1620 MachineOperatorBuilder::kFloat64RoundTruncate | |
1613 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1621 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1614 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1622 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1615 return flags; | 1623 return flags; |
1616 } | 1624 } |
1617 | 1625 |
1618 } // namespace compiler | 1626 } // namespace compiler |
1619 } // namespace internal | 1627 } // namespace internal |
1620 } // namespace v8 | 1628 } // namespace v8 |
OLD | NEW |