OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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-scheduler.h" | 5 #include "src/compiler/instruction-scheduler.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace compiler { | 9 namespace compiler { |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 case kX64Movss: | 161 case kX64Movss: |
162 return instr->HasOutput() ? kIsLoadOperation : kHasSideEffect; | 162 return instr->HasOutput() ? kIsLoadOperation : kHasSideEffect; |
163 | 163 |
164 case kX64StackCheck: | 164 case kX64StackCheck: |
165 return kIsLoadOperation; | 165 return kIsLoadOperation; |
166 | 166 |
167 case kX64Push: | 167 case kX64Push: |
168 case kX64Poke: | 168 case kX64Poke: |
169 return kHasSideEffect; | 169 return kHasSideEffect; |
170 | 170 |
| 171 case kX64Xchgb: |
| 172 case kX64Xchgw: |
| 173 case kX64Xchgl: |
| 174 return kIsLoadOperation | kHasSideEffect; |
| 175 |
171 #define CASE(Name) case k##Name: | 176 #define CASE(Name) case k##Name: |
172 COMMON_ARCH_OPCODE_LIST(CASE) | 177 COMMON_ARCH_OPCODE_LIST(CASE) |
173 #undef CASE | 178 #undef CASE |
174 // Already covered in architecture independent code. | 179 // Already covered in architecture independent code. |
175 UNREACHABLE(); | 180 UNREACHABLE(); |
176 } | 181 } |
177 | 182 |
178 UNREACHABLE(); | 183 UNREACHABLE(); |
179 return kNoOpcodeFlags; | 184 return kNoOpcodeFlags; |
180 } | 185 } |
181 | 186 |
182 | 187 |
183 int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { | 188 int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { |
184 // TODO(all): Add instruction cost modeling. | 189 // TODO(all): Add instruction cost modeling. |
185 return 1; | 190 return 1; |
186 } | 191 } |
187 | 192 |
188 } // namespace compiler | 193 } // namespace compiler |
189 } // namespace internal | 194 } // namespace internal |
190 } // namespace v8 | 195 } // namespace v8 |
OLD | NEW |