Chromium Code Reviews| 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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
| 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-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
| 10 #include "src/compiler/pipeline.h" | |
| 10 | 11 |
| 11 namespace v8 { | 12 namespace v8 { |
| 12 namespace internal { | 13 namespace internal { |
| 13 namespace compiler { | 14 namespace compiler { |
| 14 | 15 |
| 15 InstructionSelector::InstructionSelector(InstructionSequence* sequence, | 16 InstructionSelector::InstructionSelector(InstructionSequence* sequence, |
| 16 SourcePositionTable* source_positions) | 17 SourcePositionTable* source_positions) |
| 17 : zone_(sequence->isolate()), | 18 : zone_(sequence->isolate()), |
| 18 sequence_(sequence), | 19 sequence_(sequence), |
| 19 source_positions_(source_positions), | 20 source_positions_(source_positions), |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 651 } | 652 } |
| 652 | 653 |
| 653 | 654 |
| 654 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { | 655 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
| 655 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); | 656 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); |
| 656 VisitFloat64Compare(node, &cont); | 657 VisitFloat64Compare(node, &cont); |
| 657 } | 658 } |
| 658 | 659 |
| 659 | 660 |
| 660 // 32 bit targets do not implement the following instructions. | 661 // 32 bit targets do not implement the following instructions. |
| 661 #if V8_TARGET_ARCH_32_BIT | 662 #if V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET |
| 662 | 663 |
| 663 void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); } | 664 void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); } |
| 664 | 665 |
| 665 | 666 |
| 666 void InstructionSelector::VisitWord64Or(Node* node) { UNIMPLEMENTED(); } | 667 void InstructionSelector::VisitWord64Or(Node* node) { UNIMPLEMENTED(); } |
| 667 | 668 |
| 668 | 669 |
| 669 void InstructionSelector::VisitWord64Xor(Node* node) { UNIMPLEMENTED(); } | 670 void InstructionSelector::VisitWord64Xor(Node* node) { UNIMPLEMENTED(); } |
| 670 | 671 |
| 671 | 672 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 861 ASSERT(deopt->op()->opcode() == IrOpcode::kDeoptimize); | 862 ASSERT(deopt->op()->opcode() == IrOpcode::kDeoptimize); |
| 862 Node* state = deopt->InputAt(0); | 863 Node* state = deopt->InputAt(0); |
| 863 ASSERT(state->op()->opcode() == IrOpcode::kFrameState); | 864 ASSERT(state->op()->opcode() == IrOpcode::kFrameState); |
| 864 FrameStateDescriptor descriptor = OpParameter<FrameStateDescriptor>(state); | 865 FrameStateDescriptor descriptor = OpParameter<FrameStateDescriptor>(state); |
| 865 // TODO(jarin) We should also add an instruction input for every input to | 866 // TODO(jarin) We should also add an instruction input for every input to |
| 866 // the framestate node (and recurse for the inlined framestates). | 867 // the framestate node (and recurse for the inlined framestates). |
| 867 int deoptimization_id = sequence()->AddDeoptimizationEntry(descriptor); | 868 int deoptimization_id = sequence()->AddDeoptimizationEntry(descriptor); |
| 868 Emit(kArchDeoptimize | MiscField::encode(deoptimization_id), NULL); | 869 Emit(kArchDeoptimize | MiscField::encode(deoptimization_id), NULL); |
| 869 } | 870 } |
| 870 | 871 |
| 872 #if !V8_TURBOFAN_TARGET | |
|
titzer
2014/07/31 11:26:22
I think you can use the MACHINE_OP_LIST higher-ord
| |
| 873 void InstructionSelector::VisitLoad(Node* node) { UNIMPLEMENTED(); } | |
| 874 | |
| 875 void InstructionSelector::VisitStore(Node* node) { UNIMPLEMENTED(); } | |
| 876 | |
| 877 | |
| 878 void InstructionSelector::VisitWord32And(Node* node) { UNIMPLEMENTED(); } | |
| 879 | |
| 880 | |
| 881 void InstructionSelector::VisitWord32Or(Node* node) { UNIMPLEMENTED(); } | |
| 882 | |
| 883 | |
| 884 void InstructionSelector::VisitWord32Xor(Node* node) { UNIMPLEMENTED(); } | |
| 885 | |
| 886 | |
| 887 void InstructionSelector::VisitWord32Shl(Node* node) { UNIMPLEMENTED(); } | |
| 888 | |
| 889 | |
| 890 void InstructionSelector::VisitWord32Shr(Node* node) { UNIMPLEMENTED(); } | |
| 891 | |
| 892 | |
| 893 void InstructionSelector::VisitWord32Sar(Node* node) { UNIMPLEMENTED(); } | |
| 894 | |
| 895 | |
| 896 void InstructionSelector::VisitInt32Add(Node* node) { UNIMPLEMENTED(); } | |
| 897 | |
| 898 | |
| 899 void InstructionSelector::VisitInt32Sub(Node* node) { UNIMPLEMENTED(); } | |
| 900 | |
| 901 | |
| 902 void InstructionSelector::VisitInt32Mul(Node* node) { UNIMPLEMENTED(); } | |
| 903 | |
| 904 | |
| 905 void InstructionSelector::VisitInt32Div(Node* node) { UNIMPLEMENTED(); } | |
| 906 | |
| 907 | |
| 908 void InstructionSelector::VisitInt32UDiv(Node* node) { UNIMPLEMENTED(); } | |
| 909 | |
| 910 | |
| 911 void InstructionSelector::VisitInt32Mod(Node* node) { UNIMPLEMENTED(); } | |
| 912 | |
| 913 | |
| 914 void InstructionSelector::VisitInt32UMod(Node* node) { UNIMPLEMENTED(); } | |
| 915 | |
| 916 | |
| 917 void InstructionSelector::VisitConvertInt32ToFloat64(Node* node) { | |
| 918 UNIMPLEMENTED(); | |
| 919 } | |
| 920 | |
| 921 | |
| 922 void InstructionSelector::VisitConvertFloat64ToInt32(Node* node) { | |
| 923 UNIMPLEMENTED(); | |
| 924 } | |
| 925 | |
| 926 | |
| 927 void InstructionSelector::VisitFloat64Add(Node* node) { UNIMPLEMENTED(); } | |
| 928 | |
| 929 | |
| 930 void InstructionSelector::VisitFloat64Sub(Node* node) { UNIMPLEMENTED(); } | |
| 931 | |
| 932 | |
| 933 void InstructionSelector::VisitFloat64Mul(Node* node) { UNIMPLEMENTED(); } | |
| 934 | |
| 935 | |
| 936 void InstructionSelector::VisitFloat64Div(Node* node) { UNIMPLEMENTED(); } | |
| 937 | |
| 938 | |
| 939 void InstructionSelector::VisitFloat64Mod(Node* node) { UNIMPLEMENTED(); } | |
| 940 | |
| 941 | |
| 942 void InstructionSelector::VisitWord32Test(Node* node, FlagsContinuation* cont) { | |
|
titzer
2014/07/31 11:26:22
Except these ones, which need to remain.
| |
| 943 UNIMPLEMENTED(); | |
| 944 } | |
| 945 | |
| 946 | |
| 947 void InstructionSelector::VisitWord32Compare(Node* node, | |
| 948 FlagsContinuation* cont) { | |
| 949 UNIMPLEMENTED(); | |
| 950 } | |
| 951 | |
| 952 | |
| 953 void InstructionSelector::VisitFloat64Compare(Node* node, | |
| 954 FlagsContinuation* cont) { | |
| 955 UNIMPLEMENTED(); | |
| 956 } | |
| 957 | |
| 958 | |
| 959 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, | |
| 960 BasicBlock* deoptimization) {} | |
| 961 | |
| 962 #endif | |
| 963 | |
| 871 } // namespace compiler | 964 } // namespace compiler |
| 872 } // namespace internal | 965 } // namespace internal |
| 873 } // namespace v8 | 966 } // namespace v8 |
| OLD | NEW |