| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 IA32OperandGenerator g(selector); | 523 IA32OperandGenerator g(selector); |
| 524 InstructionOperand temps[] = {g.TempRegister(edx)}; | 524 InstructionOperand temps[] = {g.TempRegister(edx)}; |
| 525 selector->Emit(opcode, g.DefineAsFixed(node, eax), | 525 selector->Emit(opcode, g.DefineAsFixed(node, eax), |
| 526 g.UseFixed(node->InputAt(0), eax), | 526 g.UseFixed(node->InputAt(0), eax), |
| 527 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); | 527 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); |
| 528 } | 528 } |
| 529 | 529 |
| 530 | 530 |
| 531 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { | 531 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { |
| 532 IA32OperandGenerator g(selector); | 532 IA32OperandGenerator g(selector); |
| 533 InstructionOperand temps[] = {g.TempRegister(eax)}; |
| 533 selector->Emit(opcode, g.DefineAsFixed(node, edx), | 534 selector->Emit(opcode, g.DefineAsFixed(node, edx), |
| 534 g.UseFixed(node->InputAt(0), eax), | 535 g.UseFixed(node->InputAt(0), eax), |
| 535 g.UseUnique(node->InputAt(1))); | 536 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); |
| 536 } | 537 } |
| 537 | 538 |
| 538 void EmitLea(InstructionSelector* selector, Node* result, Node* index, | 539 void EmitLea(InstructionSelector* selector, Node* result, Node* index, |
| 539 int scale, Node* base, Node* displacement) { | 540 int scale, Node* base, Node* displacement) { |
| 540 IA32OperandGenerator g(selector); | 541 IA32OperandGenerator g(selector); |
| 541 InstructionOperand inputs[4]; | 542 InstructionOperand inputs[4]; |
| 542 size_t input_count = 0; | 543 size_t input_count = 0; |
| 543 AddressingMode mode = g.GenerateMemoryOperandInputs( | 544 AddressingMode mode = g.GenerateMemoryOperandInputs( |
| 544 index, scale, base, displacement, inputs, &input_count); | 545 index, scale, base, displacement, inputs, &input_count); |
| 545 | 546 |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 MachineOperatorBuilder::kFloat64RoundTruncate | | 1413 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1413 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1414 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 1414 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1415 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1415 } | 1416 } |
| 1416 return flags; | 1417 return flags; |
| 1417 } | 1418 } |
| 1418 | 1419 |
| 1419 } // namespace compiler | 1420 } // namespace compiler |
| 1420 } // namespace internal | 1421 } // namespace internal |
| 1421 } // namespace v8 | 1422 } // namespace v8 |
| OLD | NEW |