| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 X87OperandGenerator g(selector); | 489 X87OperandGenerator g(selector); |
| 490 InstructionOperand temps[] = {g.TempRegister(edx)}; | 490 InstructionOperand temps[] = {g.TempRegister(edx)}; |
| 491 selector->Emit(opcode, g.DefineAsFixed(node, eax), | 491 selector->Emit(opcode, g.DefineAsFixed(node, eax), |
| 492 g.UseFixed(node->InputAt(0), eax), | 492 g.UseFixed(node->InputAt(0), eax), |
| 493 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); | 493 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); |
| 494 } | 494 } |
| 495 | 495 |
| 496 | 496 |
| 497 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { | 497 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { |
| 498 X87OperandGenerator g(selector); | 498 X87OperandGenerator g(selector); |
| 499 InstructionOperand temps[] = {g.TempRegister(eax)}; |
| 499 selector->Emit(opcode, g.DefineAsFixed(node, edx), | 500 selector->Emit(opcode, g.DefineAsFixed(node, edx), |
| 500 g.UseFixed(node->InputAt(0), eax), | 501 g.UseFixed(node->InputAt(0), eax), |
| 501 g.UseUnique(node->InputAt(1))); | 502 g.UseUnique(node->InputAt(1)), arraysize(temps), temps); |
| 502 } | 503 } |
| 503 | 504 |
| 504 void EmitLea(InstructionSelector* selector, Node* result, Node* index, | 505 void EmitLea(InstructionSelector* selector, Node* result, Node* index, |
| 505 int scale, Node* base, Node* displacement) { | 506 int scale, Node* base, Node* displacement) { |
| 506 X87OperandGenerator g(selector); | 507 X87OperandGenerator g(selector); |
| 507 InstructionOperand inputs[4]; | 508 InstructionOperand inputs[4]; |
| 508 size_t input_count = 0; | 509 size_t input_count = 0; |
| 509 AddressingMode mode = g.GenerateMemoryOperandInputs( | 510 AddressingMode mode = g.GenerateMemoryOperandInputs( |
| 510 index, scale, base, displacement, inputs, &input_count); | 511 index, scale, base, displacement, inputs, &input_count); |
| 511 | 512 |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 MachineOperatorBuilder::kFloat32RoundTruncate | | 1564 MachineOperatorBuilder::kFloat32RoundTruncate | |
| 1564 MachineOperatorBuilder::kFloat64RoundTruncate | | 1565 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1565 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1566 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 1566 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1567 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1567 return flags; | 1568 return flags; |
| 1568 } | 1569 } |
| 1569 | 1570 |
| 1570 } // namespace compiler | 1571 } // namespace compiler |
| 1571 } // namespace internal | 1572 } // namespace internal |
| 1572 } // namespace v8 | 1573 } // namespace v8 |
| OLD | NEW |