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

Unified Diff: src/compiler/x64/code-generator-x64.cc

Issue 596643003: [x64] three operand imul supports first operand in memory location (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
« no previous file with comments | « no previous file | src/x64/assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0de838698bd75c081db0e3cb7dd26ee45a87882d..cdd35e276c8d956d166e14bafb0e91351a8fec7c 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -275,8 +275,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
if (input.type == kRegister) {
__ imull(i.OutputRegister(), input.reg, i.InputImmediate(1));
} else {
- __ movq(kScratchRegister, input.operand);
- __ imull(i.OutputRegister(), kScratchRegister, i.InputImmediate(1));
+ __ imull(i.OutputRegister(), input.operand, i.InputImmediate(1));
}
} else {
RegisterOrOperand input = i.InputRegisterOrOperand(1);
@@ -293,8 +292,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
if (input.type == kRegister) {
__ imulq(i.OutputRegister(), input.reg, i.InputImmediate(1));
} else {
- __ movq(kScratchRegister, input.operand);
- __ imulq(i.OutputRegister(), kScratchRegister, i.InputImmediate(1));
+ __ imulq(i.OutputRegister(), input.operand, i.InputImmediate(1));
}
} else {
RegisterOrOperand input = i.InputRegisterOrOperand(1);
« no previous file with comments | « no previous file | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698