OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/s390/frames-s390.h" | 9 #include "src/s390/frames-s390.h" |
10 | 10 |
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 CanCover(node, left)) { | 1743 CanCover(node, left)) { |
1744 left = left->InputAt(1); | 1744 left = left->InputAt(1); |
1745 Emit(kS390_DoubleConstruct, g.DefineAsRegister(node), g.UseRegister(right), | 1745 Emit(kS390_DoubleConstruct, g.DefineAsRegister(node), g.UseRegister(right), |
1746 g.UseRegister(left)); | 1746 g.UseRegister(left)); |
1747 return; | 1747 return; |
1748 } | 1748 } |
1749 Emit(kS390_DoubleInsertHighWord32, g.DefineSameAsFirst(node), | 1749 Emit(kS390_DoubleInsertHighWord32, g.DefineSameAsFirst(node), |
1750 g.UseRegister(left), g.UseRegister(right)); | 1750 g.UseRegister(left), g.UseRegister(right)); |
1751 } | 1751 } |
1752 | 1752 |
| 1753 void InstructionSelector::VisitAtomicLoad(Node* node) { |
| 1754 LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
| 1755 S390OperandGenerator g(this); |
| 1756 Node* base = node->InputAt(0); |
| 1757 Node* index = node->InputAt(1); |
| 1758 ArchOpcode opcode = kArchNop; |
| 1759 switch (load_rep.representation()) { |
| 1760 case MachineRepresentation::kWord8: |
| 1761 opcode = load_rep.IsSigned() ? kAtomicLoadInt8 : kAtomicLoadUint8; |
| 1762 break; |
| 1763 case MachineRepresentation::kWord16: |
| 1764 opcode = load_rep.IsSigned() ? kAtomicLoadInt16 : kAtomicLoadUint16; |
| 1765 break; |
| 1766 case MachineRepresentation::kWord32: |
| 1767 opcode = kAtomicLoadWord32; |
| 1768 break; |
| 1769 default: |
| 1770 UNREACHABLE(); |
| 1771 return; |
| 1772 } |
| 1773 Emit(opcode | AddressingModeField::encode(kMode_MRR), |
| 1774 g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index)); |
| 1775 } |
| 1776 |
1753 // static | 1777 // static |
1754 MachineOperatorBuilder::Flags | 1778 MachineOperatorBuilder::Flags |
1755 InstructionSelector::SupportedMachineOperatorFlags() { | 1779 InstructionSelector::SupportedMachineOperatorFlags() { |
1756 return MachineOperatorBuilder::kFloat32RoundDown | | 1780 return MachineOperatorBuilder::kFloat32RoundDown | |
1757 MachineOperatorBuilder::kFloat64RoundDown | | 1781 MachineOperatorBuilder::kFloat64RoundDown | |
1758 MachineOperatorBuilder::kFloat32RoundUp | | 1782 MachineOperatorBuilder::kFloat32RoundUp | |
1759 MachineOperatorBuilder::kFloat64RoundUp | | 1783 MachineOperatorBuilder::kFloat64RoundUp | |
1760 MachineOperatorBuilder::kFloat32RoundTruncate | | 1784 MachineOperatorBuilder::kFloat32RoundTruncate | |
1761 MachineOperatorBuilder::kFloat64RoundTruncate | | 1785 MachineOperatorBuilder::kFloat64RoundTruncate | |
1762 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1786 MachineOperatorBuilder::kFloat64RoundTiesAway | |
1763 MachineOperatorBuilder::kWord32Popcnt | | 1787 MachineOperatorBuilder::kWord32Popcnt | |
1764 MachineOperatorBuilder::kWord64Popcnt; | 1788 MachineOperatorBuilder::kWord64Popcnt; |
1765 } | 1789 } |
1766 | 1790 |
1767 } // namespace compiler | 1791 } // namespace compiler |
1768 } // namespace internal | 1792 } // namespace internal |
1769 } // namespace v8 | 1793 } // namespace v8 |
OLD | NEW |