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

Side by Side Diff: src/compiler/x64/code-generator-x64.cc

Issue 615483003: [turbofan] x64 lea multiplication matching (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 case kMode_MR: { 167 case kMode_MR: {
168 Register base = InputRegister(NextOffset(offset)); 168 Register base = InputRegister(NextOffset(offset));
169 int32_t disp = 0; 169 int32_t disp = 0;
170 return Operand(base, disp); 170 return Operand(base, disp);
171 } 171 }
172 case kMode_MRI: { 172 case kMode_MRI: {
173 Register base = InputRegister(NextOffset(offset)); 173 Register base = InputRegister(NextOffset(offset));
174 int32_t disp = InputInt32(NextOffset(offset)); 174 int32_t disp = InputInt32(NextOffset(offset));
175 return Operand(base, disp); 175 return Operand(base, disp);
176 } 176 }
177 case kMode_MX1:
178 case kMode_MX2:
179 case kMode_MX4:
180 case kMode_MX8: {
181 Register base = InputRegister(NextOffset(offset));
182 Register index = base;
183 ScaleFactor scale = ScaleFor(kMode_MX1, mode);
184 int32_t disp = 0;
185 return Operand(base, index, scale, disp);
186 }
177 case kMode_MR1: 187 case kMode_MR1:
178 case kMode_MR2: 188 case kMode_MR2:
179 case kMode_MR4: 189 case kMode_MR4:
180 case kMode_MR8: { 190 case kMode_MR8: {
181 Register base = InputRegister(NextOffset(offset)); 191 Register base = InputRegister(NextOffset(offset));
182 Register index = InputRegister(NextOffset(offset)); 192 Register index = InputRegister(NextOffset(offset));
183 ScaleFactor scale = ScaleFor(kMode_MR1, mode); 193 ScaleFactor scale = ScaleFor(kMode_MR1, mode);
184 int32_t disp = 0; 194 int32_t disp = 0;
185 return Operand(base, index, scale, disp); 195 return Operand(base, index, scale, disp);
186 } 196 }
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 break; 655 break;
646 case kX64Movsd: 656 case kX64Movsd:
647 if (instr->HasOutput()) { 657 if (instr->HasOutput()) {
648 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); 658 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand());
649 } else { 659 } else {
650 int index = 0; 660 int index = 0;
651 Operand operand = i.MemoryOperand(&index); 661 Operand operand = i.MemoryOperand(&index);
652 __ movsd(operand, i.InputDoubleRegister(index)); 662 __ movsd(operand, i.InputDoubleRegister(index));
653 } 663 }
654 break; 664 break;
665 case kX64Lea32:
666 __ leal(i.OutputRegister(), i.MemoryOperand());
667 break;
668 case kX64Lea:
669 __ leaq(i.OutputRegister(), i.MemoryOperand());
670 break;
655 case kX64Push: 671 case kX64Push:
656 if (HasImmediateInput(instr, 0)) { 672 if (HasImmediateInput(instr, 0)) {
657 __ pushq(i.InputImmediate(0)); 673 __ pushq(i.InputImmediate(0));
658 } else { 674 } else {
659 RegisterOrOperand input = i.InputRegisterOrOperand(0); 675 RegisterOrOperand input = i.InputRegisterOrOperand(0);
660 if (input.type == kRegister) { 676 if (input.type == kRegister) {
661 __ pushq(input.reg); 677 __ pushq(input.reg);
662 } else { 678 } else {
663 __ pushq(input.operand); 679 __ pushq(input.operand);
664 } 680 }
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 } 1108 }
1093 } 1109 }
1094 MarkLazyDeoptSite(); 1110 MarkLazyDeoptSite();
1095 } 1111 }
1096 1112
1097 #undef __ 1113 #undef __
1098 1114
1099 } // namespace internal 1115 } // namespace internal
1100 } // namespace compiler 1116 } // namespace compiler
1101 } // namespace v8 1117 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698