| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 537 |
| 538 void InstructionSelector::VisitWord32Shr(Node* node) { | 538 void InstructionSelector::VisitWord32Shr(Node* node) { |
| 539 VisitShift(this, node, kX87Shr); | 539 VisitShift(this, node, kX87Shr); |
| 540 } | 540 } |
| 541 | 541 |
| 542 | 542 |
| 543 void InstructionSelector::VisitWord32Sar(Node* node) { | 543 void InstructionSelector::VisitWord32Sar(Node* node) { |
| 544 VisitShift(this, node, kX87Sar); | 544 VisitShift(this, node, kX87Sar); |
| 545 } | 545 } |
| 546 | 546 |
| 547 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } | 547 void InstructionSelector::VisitInt32PairAdd(Node* node) { |
| 548 X87OperandGenerator g(this); |
| 549 |
| 550 // We use UseUniqueRegister here to avoid register sharing with the temp |
| 551 // register. |
| 552 InstructionOperand inputs[] = { |
| 553 g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), |
| 554 g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; |
| 555 |
| 556 InstructionOperand outputs[] = { |
| 557 g.DefineSameAsFirst(node), |
| 558 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; |
| 559 |
| 560 InstructionOperand temps[] = {g.TempRegister()}; |
| 561 |
| 562 Emit(kX87AddPair, 2, outputs, 4, inputs, 1, temps); |
| 563 } |
| 548 | 564 |
| 549 void InstructionSelector::VisitWord32PairShl(Node* node) { | 565 void InstructionSelector::VisitWord32PairShl(Node* node) { |
| 550 X87OperandGenerator g(this); | 566 X87OperandGenerator g(this); |
| 551 | 567 |
| 552 Node* shift = node->InputAt(2); | 568 Node* shift = node->InputAt(2); |
| 553 InstructionOperand shift_operand; | 569 InstructionOperand shift_operand; |
| 554 if (g.CanBeImmediate(shift)) { | 570 if (g.CanBeImmediate(shift)) { |
| 555 shift_operand = g.UseImmediate(shift); | 571 shift_operand = g.UseImmediate(shift); |
| 556 } else { | 572 } else { |
| 557 shift_operand = g.UseFixed(shift, ecx); | 573 shift_operand = g.UseFixed(shift, ecx); |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 MachineOperatorBuilder::kFloat32RoundTruncate | | 1545 MachineOperatorBuilder::kFloat32RoundTruncate | |
| 1530 MachineOperatorBuilder::kFloat64RoundTruncate | | 1546 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1531 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1547 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 1532 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1548 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1533 return flags; | 1549 return flags; |
| 1534 } | 1550 } |
| 1535 | 1551 |
| 1536 } // namespace compiler | 1552 } // namespace compiler |
| 1537 } // namespace internal | 1553 } // namespace internal |
| 1538 } // namespace v8 | 1554 } // namespace v8 |
| OLD | NEW |