| 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 IA32OperandGenerator g(selector); | 528 IA32OperandGenerator g(selector); |
| 529 InstructionOperand temps[] = {g.TempRegister(edx)}; | 529 InstructionOperand temps[] = {g.TempRegister(edx)}; |
| 530 selector->Emit(opcode, g.DefineAsFixed(node, eax), | 530 selector->Emit(opcode, g.DefineAsFixed(node, eax), |
| 531 g.UseFixed(node->InputAt(0), eax), | 531 g.UseFixed(node->InputAt(0), eax), |
| 532 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); | 532 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); |
| 533 } | 533 } |
| 534 | 534 |
| 535 | 535 |
| 536 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { | 536 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { |
| 537 IA32OperandGenerator g(selector); | 537 IA32OperandGenerator g(selector); |
| 538 InstructionOperand temps[] = {g.TempRegister(eax)}; |
| 538 selector->Emit(opcode, g.DefineAsFixed(node, edx), | 539 selector->Emit(opcode, g.DefineAsFixed(node, edx), |
| 539 g.UseFixed(node->InputAt(0), eax), | 540 g.UseFixed(node->InputAt(0), eax), |
| 540 g.UseUnique(node->InputAt(1))); | 541 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); |
| 541 } | 542 } |
| 542 | 543 |
| 543 void EmitLea(InstructionSelector* selector, Node* result, Node* index, | 544 void EmitLea(InstructionSelector* selector, Node* result, Node* index, |
| 544 int scale, Node* base, Node* displacement) { | 545 int scale, Node* base, Node* displacement) { |
| 545 IA32OperandGenerator g(selector); | 546 IA32OperandGenerator g(selector); |
| 546 InstructionOperand inputs[4]; | 547 InstructionOperand inputs[4]; |
| 547 size_t input_count = 0; | 548 size_t input_count = 0; |
| 548 AddressingMode mode = g.GenerateMemoryOperandInputs( | 549 AddressingMode mode = g.GenerateMemoryOperandInputs( |
| 549 index, scale, base, displacement, inputs, &input_count); | 550 index, scale, base, displacement, inputs, &input_count); |
| 550 | 551 |
| (...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 MachineOperatorBuilder::kFloat64RoundTruncate | | 1542 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1542 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1543 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 1543 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1544 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1544 } | 1545 } |
| 1545 return flags; | 1546 return flags; |
| 1546 } | 1547 } |
| 1547 | 1548 |
| 1548 } // namespace compiler | 1549 } // namespace compiler |
| 1549 } // namespace internal | 1550 } // namespace internal |
| 1550 } // namespace v8 | 1551 } // namespace v8 |
| OLD | NEW |