| 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 #ifndef V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ | 5 #ifndef V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ |
| 6 #define V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ | 6 #define V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 enum Mode { kTargetMode, kInternalMode }; | 27 enum Mode { kTargetMode, kInternalMode }; |
| 28 | 28 |
| 29 static const int kParameterCount = 3; | 29 static const int kParameterCount = 3; |
| 30 static CallDescriptor* BuildCallDescriptor(Zone* zone) { | 30 static CallDescriptor* BuildCallDescriptor(Zone* zone) { |
| 31 MachineType* parameter_array = zone->NewArray<MachineType>(kParameterCount); | 31 MachineType* parameter_array = zone->NewArray<MachineType>(kParameterCount); |
| 32 for (int i = 0; i < kParameterCount; ++i) { | 32 for (int i = 0; i < kParameterCount; ++i) { |
| 33 array[i] = kMachInt32; | 33 array[i] = kMachInt32; |
| 34 } | 34 } |
| 35 return Linkage::GetSimplifiedCDescriptor( | 35 return Linkage::GetSimplifiedCDescriptor( |
| 36 graph->zone(), | 36 graph->zone(), new (zone) MachineCallDescriptorBuilder( |
| 37 new (zone) MachineCallDescriptorBuilder(kMachInt32, kParameterCount, | 37 kMachInt32, kParameterCount, parameter_array)); |
| 38 parameter_array)); | |
| 39 } | 38 } |
| 40 | 39 |
| 41 InstructionSelectorTester() | 40 InstructionSelectorTester() |
| 42 : RawMachineAssembler( | 41 : RawMachineAssembler( |
| 43 new (main_zone()) Graph(main_zone()), | 42 new (main_zone()) Graph(main_zone()), |
| 44 BuildCallDescriptor(main_zone()), | 43 BuildCallDescriptor(main_zone()), |
| 45 kMachPtr, | 44 kMachPtr, |
| 46 machine_sig)) {} | 45 machine_sig)) {} |
| 47 | 46 |
| 48 void SelectInstructions(CpuFeature feature) { | 47 void SelectInstructions(CpuFeature feature) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 CHECK_EQ(InstructionOperand::UNALLOCATED, val->kind()); | 120 CHECK_EQ(InstructionOperand::UNALLOCATED, val->kind()); |
| 122 CHECK_EQ(UnallocatedOperand::cast(exp)->virtual_register(), | 121 CHECK_EQ(UnallocatedOperand::cast(exp)->virtual_register(), |
| 123 UnallocatedOperand::cast(val)->virtual_register()); | 122 UnallocatedOperand::cast(val)->virtual_register()); |
| 124 } | 123 } |
| 125 | 124 |
| 126 } // namespace compiler | 125 } // namespace compiler |
| 127 } // namespace internal | 126 } // namespace internal |
| 128 } // namespace v8 | 127 } // namespace v8 |
| 129 | 128 |
| 130 #endif // V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ | 129 #endif // V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ |
| OLD | NEW |