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/compiler/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/diamond.h" | 7 #include "src/compiler/diamond.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
742 Node* high_node = GetReplacementHigh(node); | 742 Node* high_node = GetReplacementHigh(node); |
743 for (int i = 0; i < node->op()->ValueInputCount(); i++) { | 743 for (int i = 0; i < node->op()->ValueInputCount(); i++) { |
744 low_node->ReplaceInput(i, GetReplacementLow(node->InputAt(i))); | 744 low_node->ReplaceInput(i, GetReplacementLow(node->InputAt(i))); |
745 high_node->ReplaceInput(i, GetReplacementHigh(node->InputAt(i))); | 745 high_node->ReplaceInput(i, GetReplacementHigh(node->InputAt(i))); |
746 } | 746 } |
747 } else { | 747 } else { |
748 DefaultLowering(node); | 748 DefaultLowering(node); |
749 } | 749 } |
750 break; | 750 break; |
751 } | 751 } |
752 case IrOpcode::kWord64ReverseBytes: { | |
753 DCHECK(machine()->Word64ReverseBytes().IsSupported()); | |
ahaas
2016/07/28 14:12:59
If the machine already supports Word64ReverseBytes
john.yan
2016/07/28 18:03:50
Check is now removed.
| |
754 DCHECK(machine()->Word32ReverseBytes().IsSupported()); | |
755 Node* input = node->InputAt(0); | |
756 ReplaceNode(node, graph()->NewNode(machine()->Word32ReverseBytes().op(), | |
757 GetReplacementHigh(input)), | |
758 graph()->NewNode(machine()->Word32ReverseBytes().op(), | |
759 GetReplacementLow(input))); | |
760 break; | |
761 } | |
752 | 762 |
753 default: { DefaultLowering(node); } | 763 default: { DefaultLowering(node); } |
754 } | 764 } |
755 } // NOLINT(readability/fn_size) | 765 } // NOLINT(readability/fn_size) |
756 | 766 |
757 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op, | 767 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op, |
758 const Operator* low_word_op) { | 768 const Operator* low_word_op) { |
759 DCHECK(node->InputCount() == 2); | 769 DCHECK(node->InputCount() == 2); |
760 Node* left = node->InputAt(0); | 770 Node* left = node->InputAt(0); |
761 Node* right = node->InputAt(1); | 771 Node* right = node->InputAt(1); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
837 common()->Phi(MachineRepresentation::kWord32, value_count), | 847 common()->Phi(MachineRepresentation::kWord32, value_count), |
838 value_count + 1, inputs_low, false), | 848 value_count + 1, inputs_low, false), |
839 graph()->NewNode( | 849 graph()->NewNode( |
840 common()->Phi(MachineRepresentation::kWord32, value_count), | 850 common()->Phi(MachineRepresentation::kWord32, value_count), |
841 value_count + 1, inputs_high, false)); | 851 value_count + 1, inputs_high, false)); |
842 } | 852 } |
843 } | 853 } |
844 } // namespace compiler | 854 } // namespace compiler |
845 } // namespace internal | 855 } // namespace internal |
846 } // namespace v8 | 856 } // namespace v8 |
OLD | NEW |