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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
771 Node* high_node = GetReplacementHigh(node); | 771 Node* high_node = GetReplacementHigh(node); |
772 for (int i = 0; i < node->op()->ValueInputCount(); i++) { | 772 for (int i = 0; i < node->op()->ValueInputCount(); i++) { |
773 low_node->ReplaceInput(i, GetReplacementLow(node->InputAt(i))); | 773 low_node->ReplaceInput(i, GetReplacementLow(node->InputAt(i))); |
774 high_node->ReplaceInput(i, GetReplacementHigh(node->InputAt(i))); | 774 high_node->ReplaceInput(i, GetReplacementHigh(node->InputAt(i))); |
775 } | 775 } |
776 } else { | 776 } else { |
777 DefaultLowering(node); | 777 DefaultLowering(node); |
778 } | 778 } |
779 break; | 779 break; |
780 } | 780 } |
781 case IrOpcode::kWord64ReverseBytes: { | |
782 DCHECK(machine()->Word32ReverseBytes().IsSupported()); | |
titzer
2016/07/29 18:21:53
Can you remove this DCHECK? E.g. the optional oper
| |
783 Node* input = node->InputAt(0); | |
784 ReplaceNode(node, graph()->NewNode(machine()->Word32ReverseBytes().op(), | |
785 GetReplacementHigh(input)), | |
786 graph()->NewNode(machine()->Word32ReverseBytes().op(), | |
787 GetReplacementLow(input))); | |
788 break; | |
789 } | |
781 | 790 |
782 default: { DefaultLowering(node); } | 791 default: { DefaultLowering(node); } |
783 } | 792 } |
784 } // NOLINT(readability/fn_size) | 793 } // NOLINT(readability/fn_size) |
785 | 794 |
786 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op, | 795 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op, |
787 const Operator* low_word_op) { | 796 const Operator* low_word_op) { |
788 DCHECK(node->InputCount() == 2); | 797 DCHECK(node->InputCount() == 2); |
789 Node* left = node->InputAt(0); | 798 Node* left = node->InputAt(0); |
790 Node* right = node->InputAt(1); | 799 Node* right = node->InputAt(1); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
866 common()->Phi(MachineRepresentation::kWord32, value_count), | 875 common()->Phi(MachineRepresentation::kWord32, value_count), |
867 value_count + 1, inputs_low, false), | 876 value_count + 1, inputs_low, false), |
868 graph()->NewNode( | 877 graph()->NewNode( |
869 common()->Phi(MachineRepresentation::kWord32, value_count), | 878 common()->Phi(MachineRepresentation::kWord32, value_count), |
870 value_count + 1, inputs_high, false)); | 879 value_count + 1, inputs_high, false)); |
871 } | 880 } |
872 } | 881 } |
873 } // namespace compiler | 882 } // namespace compiler |
874 } // namespace internal | 883 } // namespace internal |
875 } // namespace v8 | 884 } // namespace v8 |
OLD | NEW |