Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 1631973003: [turbofan] Fixing IMulHigh, which has a temp. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 728
729 void VisitMulHigh(InstructionSelector* selector, Node* node, 729 void VisitMulHigh(InstructionSelector* selector, Node* node,
730 ArchOpcode opcode) { 730 ArchOpcode opcode) {
731 X64OperandGenerator g(selector); 731 X64OperandGenerator g(selector);
732 Node* left = node->InputAt(0); 732 Node* left = node->InputAt(0);
733 Node* right = node->InputAt(1); 733 Node* right = node->InputAt(1);
734 if (selector->IsLive(left) && !selector->IsLive(right)) { 734 if (selector->IsLive(left) && !selector->IsLive(right)) {
735 std::swap(left, right); 735 std::swap(left, right);
736 } 736 }
737 InstructionOperand temps[] = {g.TempRegister(rax)};
737 // TODO(turbofan): We use UseUniqueRegister here to improve register 738 // TODO(turbofan): We use UseUniqueRegister here to improve register
738 // allocation. 739 // allocation.
739 selector->Emit(opcode, g.DefineAsFixed(node, rdx), g.UseFixed(left, rax), 740 selector->Emit(opcode, g.DefineAsFixed(node, rdx), g.UseFixed(left, rax),
740 g.UseUniqueRegister(right)); 741 g.UseUniqueRegister(right), arraysize(temps), temps);
741 } 742 }
742 743
743 744
744 void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode opcode) { 745 void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode opcode) {
745 X64OperandGenerator g(selector); 746 X64OperandGenerator g(selector);
746 InstructionOperand temps[] = {g.TempRegister(rdx)}; 747 InstructionOperand temps[] = {g.TempRegister(rdx)};
747 selector->Emit( 748 selector->Emit(
748 opcode, g.DefineAsFixed(node, rax), g.UseFixed(node->InputAt(0), rax), 749 opcode, g.DefineAsFixed(node, rax), g.UseFixed(node->InputAt(0), rax),
749 g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); 750 g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps);
750 } 751 }
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 MachineOperatorBuilder::kFloat64RoundTruncate | 1814 MachineOperatorBuilder::kFloat64RoundTruncate |
1814 MachineOperatorBuilder::kFloat32RoundTiesEven | 1815 MachineOperatorBuilder::kFloat32RoundTiesEven |
1815 MachineOperatorBuilder::kFloat64RoundTiesEven; 1816 MachineOperatorBuilder::kFloat64RoundTiesEven;
1816 } 1817 }
1817 return flags; 1818 return flags;
1818 } 1819 }
1819 1820
1820 } // namespace compiler 1821 } // namespace compiler
1821 } // namespace internal 1822 } // namespace internal
1822 } // namespace v8 1823 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698