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/base/adapters.h" | 5 #include "src/base/adapters.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 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 VisitShift(this, node, kX87Ror); | 507 VisitShift(this, node, kX87Ror); |
508 } | 508 } |
509 | 509 |
510 | 510 |
511 void InstructionSelector::VisitWord32Clz(Node* node) { | 511 void InstructionSelector::VisitWord32Clz(Node* node) { |
512 X87OperandGenerator g(this); | 512 X87OperandGenerator g(this); |
513 Emit(kX87Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 513 Emit(kX87Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
514 } | 514 } |
515 | 515 |
516 | 516 |
| 517 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } |
| 518 |
| 519 |
517 void InstructionSelector::VisitInt32Add(Node* node) { | 520 void InstructionSelector::VisitInt32Add(Node* node) { |
518 X87OperandGenerator g(this); | 521 X87OperandGenerator g(this); |
519 | 522 |
520 // Try to match the Add to a lea pattern | 523 // Try to match the Add to a lea pattern |
521 BaseWithIndexAndDisplacement32Matcher m(node); | 524 BaseWithIndexAndDisplacement32Matcher m(node); |
522 if (m.matches() && | 525 if (m.matches() && |
523 (m.displacement() == NULL || g.CanBeImmediate(m.displacement()))) { | 526 (m.displacement() == NULL || g.CanBeImmediate(m.displacement()))) { |
524 InstructionOperand inputs[4]; | 527 InstructionOperand inputs[4]; |
525 size_t input_count = 0; | 528 size_t input_count = 0; |
526 AddressingMode mode = g.GenerateMemoryOperandInputs( | 529 AddressingMode mode = g.GenerateMemoryOperandInputs( |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 MachineOperatorBuilder::kFloat32Min | | 1367 MachineOperatorBuilder::kFloat32Min | |
1365 MachineOperatorBuilder::kFloat64Max | | 1368 MachineOperatorBuilder::kFloat64Max | |
1366 MachineOperatorBuilder::kFloat64Min | | 1369 MachineOperatorBuilder::kFloat64Min | |
1367 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1370 MachineOperatorBuilder::kWord32ShiftIsSafe; |
1368 return flags; | 1371 return flags; |
1369 } | 1372 } |
1370 | 1373 |
1371 } // namespace compiler | 1374 } // namespace compiler |
1372 } // namespace internal | 1375 } // namespace internal |
1373 } // namespace v8 | 1376 } // namespace v8 |
OLD | NEW |