| 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/generic-node-inl.h" | 5 #include "src/compiler/generic-node-inl.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 346 |
| 347 | 347 |
| 348 void InstructionSelector::VisitWord32Sar(Node* node) { | 348 void InstructionSelector::VisitWord32Sar(Node* node) { |
| 349 X64OperandGenerator g(this); | 349 X64OperandGenerator g(this); |
| 350 Int32BinopMatcher m(node); | 350 Int32BinopMatcher m(node); |
| 351 if (CanCover(m.node(), m.left().node()) && m.left().IsWord32Shl()) { | 351 if (CanCover(m.node(), m.left().node()) && m.left().IsWord32Shl()) { |
| 352 Int32BinopMatcher mleft(m.left().node()); | 352 Int32BinopMatcher mleft(m.left().node()); |
| 353 if (mleft.right().Is(16) && m.right().Is(16)) { | 353 if (mleft.right().Is(16) && m.right().Is(16)) { |
| 354 Emit(kX64Movsxwl, g.DefineAsRegister(node), g.Use(mleft.left().node())); | 354 Emit(kX64Movsxwl, g.DefineAsRegister(node), g.Use(mleft.left().node())); |
| 355 return; | 355 return; |
| 356 } else if (mleft.right().Is(24) && m.right().Is(24)) { |
| 357 Emit(kX64Movsxbl, g.DefineAsRegister(node), g.Use(mleft.left().node())); |
| 358 return; |
| 356 } | 359 } |
| 357 } | 360 } |
| 358 VisitWord32Shift(this, node, kX64Sar32); | 361 VisitWord32Shift(this, node, kX64Sar32); |
| 359 } | 362 } |
| 360 | 363 |
| 361 | 364 |
| 362 void InstructionSelector::VisitWord64Sar(Node* node) { | 365 void InstructionSelector::VisitWord64Sar(Node* node) { |
| 363 VisitWord64Shift(this, node, kX64Sar); | 366 VisitWord64Shift(this, node, kX64Sar); |
| 364 } | 367 } |
| 365 | 368 |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 return MachineOperatorBuilder::kFloat64Floor | | 1171 return MachineOperatorBuilder::kFloat64Floor | |
| 1169 MachineOperatorBuilder::kFloat64Ceil | | 1172 MachineOperatorBuilder::kFloat64Ceil | |
| 1170 MachineOperatorBuilder::kFloat64RoundTruncate; | 1173 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 1171 } | 1174 } |
| 1172 return MachineOperatorBuilder::kNoFlags; | 1175 return MachineOperatorBuilder::kNoFlags; |
| 1173 } | 1176 } |
| 1174 | 1177 |
| 1175 } // namespace compiler | 1178 } // namespace compiler |
| 1176 } // namespace internal | 1179 } // namespace internal |
| 1177 } // namespace v8 | 1180 } // namespace v8 |
| OLD | NEW |