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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
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 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 namespace compiler { | 13 namespace compiler { |
14 | 14 |
15 // Adds X64-specific methods for generating operands. | 15 // Adds X64-specific methods for generating operands. |
16 class X64OperandGenerator FINAL : public OperandGenerator { | 16 class X64OperandGenerator final : public OperandGenerator { |
17 public: | 17 public: |
18 explicit X64OperandGenerator(InstructionSelector* selector) | 18 explicit X64OperandGenerator(InstructionSelector* selector) |
19 : OperandGenerator(selector) {} | 19 : OperandGenerator(selector) {} |
20 | 20 |
21 bool CanBeImmediate(Node* node) { | 21 bool CanBeImmediate(Node* node) { |
22 switch (node->opcode()) { | 22 switch (node->opcode()) { |
23 case IrOpcode::kInt32Constant: | 23 case IrOpcode::kInt32Constant: |
24 return true; | 24 return true; |
25 case IrOpcode::kInt64Constant: { | 25 case IrOpcode::kInt64Constant: { |
26 const int64_t value = OpParameter<int64_t>(node); | 26 const int64_t value = OpParameter<int64_t>(node); |
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 if (CpuFeatures::IsSupported(SSE4_1)) { | 1549 if (CpuFeatures::IsSupported(SSE4_1)) { |
1550 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1550 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1551 MachineOperatorBuilder::kFloat64RoundTruncate; | 1551 MachineOperatorBuilder::kFloat64RoundTruncate; |
1552 } | 1552 } |
1553 return flags; | 1553 return flags; |
1554 } | 1554 } |
1555 | 1555 |
1556 } // namespace compiler | 1556 } // namespace compiler |
1557 } // namespace internal | 1557 } // namespace internal |
1558 } // namespace v8 | 1558 } // namespace v8 |
OLD | NEW |