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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index fdf63855d59cac64d5f9083657a8688d769c4347..79e853191c49e91cb8003e9166ce2f1db2a0a6bf 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -174,6 +174,16 @@ class X64OperandConverter : public InstructionOperandConverter {
int32_t disp = InputInt32(NextOffset(offset));
return Operand(base, disp);
}
+ case kMode_MX1:
+ case kMode_MX2:
+ case kMode_MX4:
+ case kMode_MX8: {
+ Register base = InputRegister(NextOffset(offset));
+ Register index = base;
+ ScaleFactor scale = ScaleFor(kMode_MX1, mode);
+ int32_t disp = 0;
+ return Operand(base, index, scale, disp);
+ }
case kMode_MR1:
case kMode_MR2:
case kMode_MR4:
@@ -652,6 +662,12 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
__ movsd(operand, i.InputDoubleRegister(index));
}
break;
+ case kX64Lea32:
+ __ leal(i.OutputRegister(), i.MemoryOperand());
+ break;
+ case kX64Lea:
+ __ leaq(i.OutputRegister(), i.MemoryOperand());
+ break;
case kX64Push:
if (HasImmediateInput(instr, 0)) {
__ pushq(i.InputImmediate(0));

Powered by Google App Engine
This is Rietveld 408576698