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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 553 |
554 void InstructionSelector::VisitInt64Mul(Node* node) { | 554 void InstructionSelector::VisitInt64Mul(Node* node) { |
555 if (TryEmitLeaMult(this, node, kX64Lea)) return; | 555 if (TryEmitLeaMult(this, node, kX64Lea)) return; |
556 VisitMul(this, node, kX64Imul); | 556 VisitMul(this, node, kX64Imul); |
557 } | 557 } |
558 | 558 |
559 | 559 |
560 void InstructionSelector::VisitInt32MulHigh(Node* node) { | 560 void InstructionSelector::VisitInt32MulHigh(Node* node) { |
561 X64OperandGenerator g(this); | 561 X64OperandGenerator g(this); |
562 InstructionOperand* temps[] = {g.TempRegister(rax)}; | 562 InstructionOperand* temps[] = {g.TempRegister(rax)}; |
563 size_t temp_count = arraysize(temps); | |
564 Emit(kX64ImulHigh32, g.DefineAsFixed(node, rdx), | 563 Emit(kX64ImulHigh32, g.DefineAsFixed(node, rdx), |
565 g.UseFixed(node->InputAt(0), rax), g.UseRegister(node->InputAt(1)), | 564 g.UseFixed(node->InputAt(0), rax), g.UseUniqueRegister(node->InputAt(1)), |
566 temp_count, temps); | 565 arraysize(temps), temps); |
567 } | 566 } |
568 | 567 |
569 | 568 |
570 static void VisitDiv(InstructionSelector* selector, Node* node, | 569 static void VisitDiv(InstructionSelector* selector, Node* node, |
571 ArchOpcode opcode) { | 570 ArchOpcode opcode) { |
572 X64OperandGenerator g(selector); | 571 X64OperandGenerator g(selector); |
573 InstructionOperand* temps[] = {g.TempRegister(rdx)}; | 572 InstructionOperand* temps[] = {g.TempRegister(rdx)}; |
574 selector->Emit( | 573 selector->Emit( |
575 opcode, g.DefineAsFixed(node, rax), g.UseFixed(node->InputAt(0), rax), | 574 opcode, g.DefineAsFixed(node, rax), g.UseFixed(node->InputAt(0), rax), |
576 g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); | 575 g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 | 1104 |
1106 | 1105 |
1107 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { | 1106 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
1108 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); | 1107 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); |
1109 VisitFloat64Compare(this, node, &cont); | 1108 VisitFloat64Compare(this, node, &cont); |
1110 } | 1109 } |
1111 | 1110 |
1112 } // namespace compiler | 1111 } // namespace compiler |
1113 } // namespace internal | 1112 } // namespace internal |
1114 } // namespace v8 | 1113 } // namespace v8 |
OLD | NEW |